telegramdesktop / tdesktop

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

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

Closed facundobatista closed 10 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!

Aokromes 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.

well, if you don't updated telegram and it's fixed it's clear the bug was external, maybe no one using telegram used other affected applications :)

gmolledaj commented 4 years ago

1.- Telegram did not work 2.- Update ibus package and other as ibus-gtk3 3.- I view the update and reinit session for load changes in user session. 4.- Telegram works. OS: LinuxMint 19 XFCE (Ubuntu 18.04)

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.

Okay, I eventually had further looks into it and it was all of my Qt/KDE not using IBus at the time. Konsole – for example – however did follow my normal keyboard's compose key (which Telegram didn't), and that part worked, which is what confused me. IME didn't work. I rebooted several times and no changes to the settings did anything... And then I booted today and it's back and functional in Konsole at least (compose letter appears, IME works, dead keys do their thing), and now Telegram still doesn't work.

This is amazingly finicky. And annoying.

gmolledaj commented 4 years ago

In my case, I think I remember that in the configuration (Linux Mint control panel) I did not specify whether ibus or xim, it was blank. When ibus was updated I checked the settings and chose ibus for keyboard operation, then I rebooted session and it worked. You can see if you have ibus selected in the keyboard settings.

teo1978 commented 4 years ago

well, if you don't updated telegram and it's fixed it's clear the bug was external,

No it's not (unless by "it's clear" you mean "it makes you suspect"). It might be that the condition that triggers the bug went away.

Besides, I did update telegram (well it got updated automatically but that's when I observed the issue disappeared)

I'm not saying it must be a telegram bug, but given it's the only application that has ever been reported to be affected that we know of so far, it seems the most likely culprit.

ralesk commented 4 years ago

Environment context for my comments: I'm using MATE on Fedora (29 currently), and its keyboard settings have been set to ibus since forever and my env always contains the QT_IM_MODULE=ibus variable. IBus's IME and composition and whatnot works perfectly on any non-Qt application.

teo1978 commented 4 years ago

@KlausDevWalker

@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.

I don't think so, I don't know what Snap is. I got it from here: https://desktop.telegram.org/

I hope that's the official version, otherwise it's pretty well disguised.

kaasknak commented 4 years ago

@KlausDevWalker

@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.

I don't think so, I don't know what Snap is. I got it from here: https://desktop.telegram.org/

I hope that's the official version, otherwise it's pretty well disguised.

That is indeed the official link and also where I experience the problem. Using the ubuntu 18.04 repo I get a very dated version but it does not have the problem with the keys.

KlausEverWalkingDev commented 4 years ago

@teo1978

I don't think so, I don't know what Snap is. I got it from here: https://desktop.telegram.org/

I hope that's the official version, otherwise it's pretty well disguised.

Snaps are official too, but they cause a lot of permission misbehaviours on system. So I keep them away. :)

rolivegab commented 4 years ago

i'm having that bug too, accents doesn't work, characters like "áéíóúãẽĩõũç"

using fedora 30, and snap version of telegram ibus version 1.5.20-5

UPDATE: ç works, but the rest, no

i can't even write symbols like "~", or "`", or "´", or "^"

koiuo commented 4 years ago

FWIW, here are steps that are 100% reproducible for me. Hopefully this will help tracking down the issue

Case 1

  1. Open telegram with any chat
  2. Type known compose sequence, f.ex. <compose>'o to get ó ✔ It works, ó is typed

Case 2

  1. Open telegram with any chat having previous messages
  2. Right click on any message form history and select Reply
  3. Type known compose sequence, f.ex. <compose>'o to get ó ✘ It doesn't work, 'o is typed instead

Case 3

  1. Open telegram with any chat having previous messages
  2. Right click on any message form history and select Reply
  3. Type known compose sequence, f.ex. <compose>'o to get ó ✘ It doesn't work, 'o is typed instead
  4. Switch to any other window and then back to telegram
  5. Type known compose sequence, f.ex. <compose>'o to get ó ✔ It works, ó is typed

So for me the issue happens only when Reply feature is used. Similar Forward feature doesn't have the bug.

teo1978 commented 4 years ago

Not for me. When I was observing the issue, it would happen always, not only when using Reply. Now I'm not observing it anymore.

anarcobuda commented 4 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.

Works like beautiful magic, thank you very much wizards!

rolivegab commented 4 years ago

here solved by installing through dnf rpm-fusion repo

ravanscafi commented 4 years ago

I'm still experiencing the issue using the snap version. (just in case someone is tracking it)

qustavo commented 4 years ago

I have the same problem than @edio

amd77 commented 4 years ago

Happened today with Debian 10. Ibus 1.5.19. Its like magic... only in Telegram window. QT_IM_MODULE=xim fix works. This is a useful tip if you dont want to apply it:

In my keyboard layout (us international with dead keys), i can type 'é' using dead key ''' and next pressing 'e'. And also using ALTGr+e.

ALTGr+e works while dead key not.

danilocesar commented 4 years ago

Same here.

Looks like settings the keyboard to anything with Dead Keys triggers the problem. Like Brazilian Portuguese or English with Dead Keys.

Currently using Fedora 30 and ibus 1.5.20-5.fc30

jayypluss commented 4 years ago

I'm experiencing the same problem as @rolivegab. QT_IM_MODULE=xim /usr/bin/telegram-desktop doesn't fix it for me. Output for QT_IM_MODULE=xim /usr/bin/telegram-desktop --debug is:

➜  ~ QT_IM_MODULE=xim /usr/bin/telegram-desktop --debug
QApplication: invalid style override passed, ignoring it.
    Available styles: dsemilight, dsemidark, dlight, ddark, Windows, Fusion
qt.xkb.compose: failed to create compose table

System info (using screenfetch):

                   -`                 
                  .o+`                 user@user
                 `ooo/                 OS: Arch Linux 
                `+oooo:                Kernel: x86_64 Linux 5.2.14-arch2-1-ARCH
               `+oooooo:               Uptime: 1h 8m
               -+oooooo+:              Packages: 1311
             `/:-:++oooo+:             Shell: zsh 5.7.1
            `/++++/+++++++:            Resolution: 1920x1848
           `/++++++++++++++:           DE: Cinnamon 4.2.4
          `/+++ooooooooooooo/`         WM: Muffin
         ./ooosssso++osssssso+`        WM Theme: Numix-Cinnamon-Transparent (Numix-Frost-Light)
        .oossssso-````/ossssss+`       GTK Theme: Numix-Frost-Light [GTK2/3]
       -osssssso.      :ssssssso.      Icon Theme: Flat-Remix-Blue-Dark
      :osssssss/        osssso+++.     Font: Sans 9
     /ossssssss/        +ssssooo/-     CPU: Intel Core i7-7500U @ 4x 3.5GHz [25.0°C]
   `/ossssso+/:-        -:/+osssso+-   GPU: Mesa DRI Intel(R) HD Graphics 620 (Kaby Lake GT2) 
  `+sso+:-`                 `.-/+oso:  RAM: 3448MiB / 7854MiB
 `++:.                           `-/+/
 .`                                 `/
ribeirobreno commented 4 years ago

This bug happens 100% of the time (any input field, chat, ... and no need to alt+tab or do anything) for me at Ubuntu Xenial with XFCE and ABNT2 keyboard. Two workarounds work here:

ghost commented 4 years ago

Fedora 31 wtih 3.34.1 happens this issue, I cannot put accents in Spanish.

nunesgh commented 4 years ago

I came here thinking I was going to report something new, but this issue has been around since 2015! Wow!

fccoelho commented 4 years ago

For me what worked was to remove the Snap installation and installing from apt

snap remove telegram-desktop
apt install telegram-desktop
gsilvapt commented 4 years ago

Still happens in Ubuntu 19.04 and 19.10. The solution is to not use the snap and install via the binaries from their website (Telegram has simple instructions, so it shouldn't be hard even for people not used to the terminal.

zoltanp commented 4 years ago

I'm having this issue on Linux (Xubuntu 18.04, Telegram v 1.9.7, keyboard layout US International with AltGr dead keys).

After starting the system and starting Telegram, key combinations like AltGr + e (=é) work, but key combinations like AltGr+Shift+2,o = (ő) do not.

However, after pasting text containing the ő character into the message input in Telegram, the key combinations like AltGr+Shift+2,o start working, and continue to work even after restarting Telegram.

joaquinferrero commented 4 years ago

I have the same problem in Ubuntu 14.10.

Same problem with Linux Mint 17.3

nunesgh commented 4 years ago

@auchri doesn't this issue deserve a "bug" tag?

shoorick commented 4 years ago

Compose key doesn’t work as expected: it gives ⁈ character immediately then ignore sequence rules and print following characters as is. Example: sequence Compose, ', a shown as á in other apps and as ⁈'a in Telegram.

env QT_IM_MODULE=xim telegram-desktop doesn’t help.

Debian 10, telegram-desktop 1.5.11-1.

MuseScore which uses QT, have the same issue.

joaquinferrero commented 4 years ago

I have the same problem in Ubuntu 14.10.

Same problem with Linux Mint 17.3

The fix

env QT_IM_MODULE=xim /path/to/Telegram

works!

nunesgh commented 4 years ago

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

Does not work on KDE neon 5.18 User Edition.

Default command was env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/telegram-desktop_telegram-desktop.desktop /snap/bin/telegram-desktop -- %u

I use a Brazilian Portuguese keyboard and I can type the ç character, but no accented letters.

ravanscafi commented 4 years ago

This workaround worked until a few versions ago. Using "source A" or "source B" to install the client is not a real solution too, because you are simply getting an old version, where it used to work.

The problem is that on newer versions of the client, this issue happens and there is NO solution till this day.

php4fan commented 4 years ago

The problem is that on newer versions of the client, this issue happens

That's funny because I had the issue for a "brief" period (meaning an awfully long period of several weeks if not months) long ago, and then it got fixed with some automatic update (I never did anything about it) and I've never had it again.

ilya-fedin commented 4 years ago

because you are simply getting an old version

No, it is deeper. When you're installing a version from system repositories, it uses system Qt and can use system Qt's integration plugins, including platforminputcontext. The static version from official site or github releases can't use these plugins. Snaps and fllatpaks have a predefined set of Qt plugins in itself (telegram-desktop snap has been reworked some time ago, you can check if this is fixed on it).

So, for anyone who uses some input engines or other external things to type, the only option is to use distribution package.

EdnilsonRobert commented 4 years ago

For me what worked was to remove the Snap installation and installing from apt

snap remove telegram-desktop
apt install telegram-desktop

Works like a charm.

nunesgh commented 4 years ago

For me what worked was to remove the Snap installation and installing from apt

snap remove telegram-desktop
apt install telegram-desktop

But the feature gap between the snap and the apt releases is huge, isn't it? The snap version is currently 2.0.1 while the apt version is still 1.2.17-1.

Aokromes commented 4 years ago

For me what worked was to remove the Snap installation and installing from apt

snap remove telegram-desktop
apt install telegram-desktop

But the feature gap between the snap and the apt releases is huge, isn't it? The snap version is currently 2.0.1 while the apt version is still 1.2.17-1.

download telegram from desktop.telegram.org or github->releases.

ilya-fedin commented 4 years ago

There are flatpak version also

ilya-fedin commented 4 years ago

Snap was transferred to kde-neon extension as a base with Qt 5.12.3 instead of 5.9. Maybe something is changed?

jayypluss commented 4 years ago

I use Arch Linux and I have uninstalled the community/telegram-desktop package from pacman that I was using before and installed the latest x64 binary downloaded from this git project. Now it works.

gsilvapt commented 4 years ago

Yes, that has been the deal all along. If you install the binaries (either from GitHub or from the website), they work. Snaps or repository, do not. Not sure about flatpak, never tried that one.

nunesgh commented 4 years ago

I am currently using the flatpak version and this issue is not present there.

herzenschein commented 4 years ago

For those people whose workaround QT_IM_MODULE=xim telegram does not work, or for those who use Telegram on Wayland, could you try the following and report whether this works? XCOMPOSEFILE=/usr/share/X11/locale/$LANG/Compose telegram

xthiago commented 4 years ago

For those people whose workaround QT_IM_MODULE=xim telegram does not work, or for those who use Telegram on Wayland, could you try the following and report whether this works? XCOMPOSEFILE=/usr/share/X11/locale/$LANG/Compose telegram

XCOMPOSEFILE=/usr/share/X11/locale/$LANG/Compose telegram-desktop

It did not work on Ubuntu 20.04.

ilya-fedin commented 4 years ago

It did not work on Ubuntu 20.04.

pls specify installation method

xthiago commented 4 years ago

It did not work on Ubuntu 20.04.

pls specify installation method

Using snap (snap install telegram-desktop).

To get accents to work properly I removed it (snap install telegram-desktop) and installed it manually (downloading the binary from telegram.org and putting it on /opt).

ilya-fedin commented 4 years ago

Do you use ibus?

xthiago commented 4 years ago

I don't know. I have the default distribution of Ubuntu 20.04 without relevant customizations.

Should I install it manually?

ilya-fedin commented 4 years ago

I don't know.

echo $QT_IM_MODULE

Should I install it manually?

No

ilya-fedin commented 4 years ago

Everyone who affected by this issue, please, test version 2.1.11-1-ge009ac026 on the edge channel

snap refresh --edge telegram-desktop

ilya-fedin commented 4 years ago

Anyone? :thinking: