telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
25.88k stars 5.13k forks source link

Desktop client is not "reading" my accentuated letters using composite keys #1041

Closed facundobatista closed 9 months ago

facundobatista commented 9 years ago

When I normally write in all the rest of the programs, if I hit ' and e, I see é.

However, in Telegram app it appears the e without the tilde.

Same happens for all the composite letters. Note that this doesn't seem to be an "unicode" problem... if I hit "ñ" (I have a separate key in the keyboard for it), it appears ok.

Thanks!

facundobatista commented 9 years ago

auchri: thanks for checking! I'm seeing that #27 is about showing those characters... and my problem was about inserting them

However, I just tried it again, and it worked! very, very strange: I just closed the window half an hour ago and now I reopened it: no even restarted the telegram process.

I'll have to debug this deeper... any hint? (like starting telegram in --debug in the terminal or something)

Thanks

facundobatista commented 9 years ago

So, I finally reproduced the sequence for this to happen. It's very weird.

Let's start from the process being started, the Telegram window is not open, but the icon in the systray is ok. I click in that icon, choose "Open Telegram", and the main window pops up.

There, if I use composite keys (again, for example, ' and e would make an é) all works ok. I send the message, the entry box is clean.

Then I commute with to other window (alt-tab, or clicking somewhere else), and when I'm back, the composite keys no longer work!!!

Then I close the window. Go to the systray icon, and make it open again, and composite keys work fine. Until next window switching, of course.

I'll very glad to help you with this debugging.

Thanks!

ralesk commented 9 years ago

I'm afraid your steps don't destroy neither dead keys nor compose sequences in my Telegram :(

(Fedora 21 + KDE 4 in my case)

facundobatista commented 9 years ago

So it doesn't happen everywhere! This is good news (even if it may complicate the debugging).

ralesk commented 9 years ago

I wonder if the linux release also uses its own Qt (and doesn't just ship with it, it really loads those libs), if it doesn't, maybe there's a bad patch (or the lack of it) in the distro's Qt.

Or maybe it's higher up. Maybe it's something in the desktop environment doing something weird with the keyboard (in early versions of KDE4 kwin the alt key could get stuck after alt-tabbing — so hmm, try another window manager than the one you're currently using and see if the issue can be reproduced then), maybe it's something on the X11 level (examining distro patches could help here, but I'm not sure which part of X.Org we should be looking at precisely).

ricardobarantini commented 8 years ago

I have the same problem in Ubuntu 14.10.

kaluosi commented 8 years ago

I have the same problem with Ubuntu 14.04 LTS. I have try to resolve it installing ibus-qt4 but it does not work.

eullerborges commented 8 years ago

Also having the same problem on Ubuntu Gnome 14.04 LTS. Installing ibus-qt4 didn't solve it either.

musantro commented 8 years ago

Also having the same problem on Ubuntu 15.10. Installing ibus-qt4 didn't solved it. This issue only happens in Telegram desktop; in other programs the accent works fine.

alfonsonishikawa commented 8 years ago

Same problem in Xubuntu 15.10. I have to copy from Mousepad and paste in Telegram to get the tildes.

Patola commented 8 years ago

Same problem in Ubuntu 16.04 64-bits, Unity desktop environment. And I have an almost identical computer with the same version of Ubuntu in which it does not happen. Even tried to switch the GTK_IM_MODULE variable to no avail.

martinchaves commented 8 years ago

I have the same problem but only in the send image window, and sometimes it just works.

Steps:

  1. Select a conversation
  2. Click the camera icon
  3. Select an image
  4. On the new windows use compose key for any char sequence.

Workarround: minimize the application with the send image windows open and restore.

I'm using Debian testing/sid with 5.5.1 qtbase-abi-5-5-1 and almost all KDE/Plasma form experimental repos.

narcelio commented 8 years ago

Workaround: call with QT_IM_MODULE=xim /opt/telegram/Telegram

alfonsonishikawa commented 8 years ago

@narcelio's solution works in Xubuntu 16.04.

Had to write the command as env QT_IM_MODULE=xim /opt/telegram/Telegram in my launcher, although.

eullerborges commented 8 years ago

@narcelio's solution works like a charm on Ubuntu Gnome 14.04!

aldonogueira commented 7 years ago

Same problem here on elementary OS Loki. The workaround of setting QT_IM_MODULE=xim solves the problem, but then I noticed that the default value is QT_IM_MODULE=ibus. Thus, adding "ibus-daemon" to the list of apps run at initialization works as well.

Starkie commented 7 years ago

@narcelio's solution worked for me on Xubuntu 16.04, with Spanish keyboard layout.

sgregori commented 7 years ago

@facundobatista @narcelio Solution works like a charm ( spanish keyboard ) thank you very much!!

xkrambler commented 7 years ago

@narcelio +1 Solution works like a charm (Spanish keyboard also)

caco13 commented 7 years ago

@narcelio's solution works well, adding @alfonsonishikawa tip (env) in Xubuntu Menu Editor Application Laucher.

nienkeboomsma commented 7 years ago

I am experiencing exactly the same bug on Windows. @facundobatista's observation that accented characters work again once you re-open Telegram from the system tray is still applicable. Not really workable though, to re-open Telegram from the system tray every time you've switched windows.

Happy to see there's a fix for Linux, has any fix been found for Windows?

Darkhogg commented 7 years ago

Still happening to me on Ubuntu 16.04, and @narcelio's solution works.

vamcs commented 7 years ago

Adding ibus-daemon to startup apps as @aldonogueira said on Elementary OS Loki worked for me.

hearues-zueke-github commented 7 years ago

Also this link helped me for the same problem: https://askubuntu.com/questions/135548/how-to-add-ibus-to-start-up-applications As @vamcs and @aldonogueira said before me.

jjchico commented 6 years ago

Same problem with telegram desktop 1.1.23 from the Ubuntu 16.04 snap repository (telegram-sergiusens). None of the workarounds above work, IM is set to ibus and ibus-daemon is running.

athosmoreno commented 6 years ago

Still reproducible on Telegram Desktop 1.2.6 with Ubuntu 16.04.4. Installed via snap.

edevil commented 6 years ago

Still reproducible on Telegram Desktop 1.2.15 with Ubuntu 17.10.

Installed via Snap.

athosmoreno commented 6 years ago

@edevil try the normal build, for some reason the snap one still has this bug

adialaleal commented 6 years ago

Worked at Ubuntu 17.10. If you install the Telegram Desktop from the Ubuntu Store the dead keys will not work. But if you download the app from Telegram's site, will be work naturally!

Igetin commented 6 years ago

Just chiming in here: dead keys aren't working for me on the latest Telegram Desktop (1.2.17), on Ubuntu 16.04. I'm using fcitx as my input method, but the problem didn't disappear when I tried ibus and xim. The problem exists in all of my other QT applications as well.

john-preston commented 6 years ago

@Igetin There is some envvar for that? QT_IM_something?

Igetin commented 6 years ago

@john-preston QT_IM_MODULE, as @narcelio mentioned.

john-preston commented 6 years ago

@Igetin So it doesn’t work with it as well? In any of Qt apps?

Igetin commented 6 years ago

@john-preston That's right.

sjmuniz commented 5 years ago

Telegram 1.4.3 I've created a shell script to start telegram:

$ cat bin/telegram.sh 
export QT_IM_MODULE=xim
cd $HOME/Downloads/Telegram
./Telegram &

I am using US international with deade keys. However it is odd that even when I have no IM method configured, and defaults to XIM, I need to pass this variable in order to inform QT I am using XIM.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:    16.04
Codename:   xenial
using 
$ cat ~/.xinputrc
# im-config(8) generated on Mon, 26 Feb 2018 03:55:41 -0300
run_im none
# im-config signature: 047389d2485e586bf71ebb0c8d18fa12  -
smuniz@d630:~/Downloads/Telegram$ im-config -l
 xim
smuniz@d630:~/Downloads/Telegram$ im-config -m
default
none
none

none

Regards.

g-bougard commented 5 years ago

This problem just appeared to me on v1.4.3 after an Ubuntu upgrade from 12.04 to 16.04. The QT_IM_MODULE=xim trick fixes the problem.

KlausEverWalkingDev commented 5 years ago

Problem still present on version 1.6.0 installed through Snap on Kubuntu 18.10 KDE Plasma version. I have the vague impression that if I'd use the repository version, this bug will disappear. But it is not in the latest version though...

mazulo commented 5 years ago

I was having this issue and tried a LOT of things, like rebuild my locale, running with QT_IM_MODULE=xim, installing ibus and making some adjustments to its preferences, install the official package from telegram.org but nothing worked. I was still getting these weird chars instead of accents: Screenshot from 2019-07-04 20-41-23

it was supposed to be: e num é que é memo

By the end what solved, for whatever reason, was to uninstall the package (installed by yay -S telegram-desktop-bin) and install again with sudo pacman -S telegram-desktop

ralesk commented 5 years ago

@mazulo out of curiosity, what was your locale when the � characters appear? I'm willing to bet something non-UTF-8, and that's weird in these days.

fernandoval commented 4 years ago

I did solve the problem editing the .desktop launcher and adding the environment variable before the program name in the Exec entry like this:

Exec=env QT_IM_MODULE=xim /home/fernando/Telegram/Telegram -- %u
kaasknak commented 4 years ago

I have a similar problem on ubuntu mate 18.04. I have tried reinstalling from the website and reinstalling from the repos. Both don´t fix the situation. Just a bit ago it was working on the repo version but not the website version and then when I logged out and in again it was no longer working again.

EDIT: It seems that completely purging the website´s version and then reinstalling from the repos works. This does mean that I am many versions behind now though. @fernandoval ´s solution did not work for me. It just fails to start then.

brunodantas commented 4 years ago

This just started happening today on Ubuntu 19.04. @fernandoval's solution fixed it for me.

filippobistaffa commented 4 years ago

Same as @brunodantas, this bug re-appeared mysteriously today. @fernandoval's solution confirmed to work smoothly.

gmolledaj commented 4 years ago

LinuxMint 19.2 Tina (Ubuntu 18.04) dead key no trabaja, ne funkcias, don't work remap keys ALT GR + ĉ,ĝ,ĥ,ĵ,ŝ,ŭ esperanto keys : ALT GR A,E,I,O : áéíó spanish keys xmodmap -pke > $HOME/.xmodmap cambiar, ŝanĝi, change: keycode 26 = e E e E U00E9 U00C9 EuroSign keycode 30 = u U u U U016D U016C U016D keycode 31 = i I i I U00ED U00CD rightarrow keycode 32 = o O o O U00F3 U00D3 oslash keycode 38 = a A a A U00E1 U00C1 ae keycode 39 = s S s S U015D U015C ssharp keycode 42 = g G g G U011D U011C eng keycode 43 = h H h H U0125 U0124 hstroke keycode 44 = j J j J U0135 U0134 dead_hook keycode 54 = c C c C U0109 U0108 cent xmodmap ~/.xmodmap Telegram

teo1978 commented 4 years ago

This shitty bug appeared on my Telegram Desktop a few weeks ago (for the first time ever) on Ubuntu 16.04 (I've had Telegram Desktop installed on this computer for years, on the same Ubuntu 16.04 for years, and I did nothing other than get the automatic updates of the OS and those of Telegram).

Right now Telegram was updated to 1.8.11, and I have tested and it works as expected again.

I don't know whether you have finally fixed it after four fucking years, or if the issue just comes and goes randomly, or if it is triggered by something that has changed in some OS component that got udated.

KlausEverWalkingDev commented 4 years ago

@teo1978 are you using Snap? This is a common problem in this version of Telegram. Try to use something from the official repos or try Telegreat.

gmolledaj commented 4 years ago

Now it works. The problem came with update package ibus and leaved with other update of package ibus. All right.

Aokromes commented 4 years ago

so, this was external bug and not telegram?

ralesk commented 4 years ago

It stopped working for me a few days ago, and no QT_IM_MODULE change fixes it (ibus or xim, it just doesn't work) — and Telegram is the only application doing this and I'm not really sure what broke. It's really quite strange that Telegram is so sensitive to this.

I notice that KDE applications stopped displaying the ⎄ and the underlined u character (during composition and Unicode insertion respectively), but they actually do the deed, just not as visibly as before. Telegram just straight up ignores everything to do with my IME now, and GTK apps seem perfectly content about IBus.

teo1978 commented 4 years ago

so, this was external bug and not telegram?

That seems unlikely. I have never seen the issue on a single other application in my entire life.

I can't rule out completely that it's an external bug that only affects Telegram, but it seems more likely a Telegram bug that's triggered maybe by some external factor and/or bug.