-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Text-as-code-points enhancement does not work with Cyrillic keyboard layout #6167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Works for me, your version of kitty is extremely old, I suggest updating |
|
Then I am going to need more details to reproduce with. What layout are you using exactly, and what command did you use to switch to it? |
Thanks for taking the time to look into this issue! I have two layouts installed: English (US) and Russian. I use key combination Alt+Shift to switch between them. |
That's something distro specific, I need to know what exact layout is |
Running setxkbmap ru; kitty +kitten show_key -m kitty shows the following output on pressing the a key, as expected.
|
Never mind I see what the problem is, I was confused by an unrelated bug in the show_key kitten |
Thanks a lot! Unfortunately I am unable to build kitty from sources (I get "tools/crypto/crypto.go:9:2: package crypto/ecdh is not in GOROOT (/usr/lib/go-1.18/src/crypto/ecdh)" error and not so familiar with golang to solve it), so I will wait for fresh nightly version to build and recheck. |
In the nightly build, the error is no longer reproduced, thank you very much! |
You need go >= 1.20 for kitty |
Sill problems. Steps to reproduce:
I've recorded a video for you showing this behavior: simplescreenrecorder-2024-04-05_07.58.19.mp4 |
I am afraid I have zero interest in debugging issues in ancient versions of kitty. |
Retested with 0.33.1 |
The only way that can happen is if your system is not sending actual keypresses but instead just plain text for those key events, some IMEs for instance will do that. Easily verified by running kitty with --debug-input. In which case fix your system to not do that. |
Here is a keyboard log (with I know nothing about IME, it's just a clean Ubuntu 23.10 setup with no additional tweaks or settings, just two keyboard layouts enabled. Also other terminals that can do enhanced key reporting, as far2l's internal VT, do report keys as expected. If protocol is not working out of the box on the one of the most popular operating systems, maybe there is some problem with protocol and/or implementation? |
Look at the log, it is full of IME events, as I thought. And I cant see kitten show-key -m kitty Here is the relevant section of the log, immediately after turning on kitty keyboard mode.
|
And you can see in the log that your Wayland compositor is converting key press events to key press events with key code zero, for example the line:
As usual, this will be a wayland specific problem and my standard advice is to switch to X11. As for why the ru layout does this in GNOME, I have no clue, it will need investigation. |
Issue with associated text being reported as English, not current keyboard layout (Russian), is still reproducing under X11. |
And I just tested foot under Wayland with the RU layout. It also does |
What's the issue, exactly? kitty will report whatever text the system sends to it, it does not translate russian to english on the fly. You can see it again with --debug-input |
It should be documented in protocol definition then. Not "textual representation of pressed keys", but "same data that OS sends to terminal app, unmodified". Well, such protocol will never become somewhat popular or even multiplatform. Things may change depending on compositor, DE, OS version, whatever. This is not how standards work. |
On Fri, Apr 05, 2024 at 01:10:49AM -0700, unxed wrote:
It should be documented in protocol definition then. Not "textual representation of pressed keys", but "whatever OS sends to terminal app, unmodified".
Well, such protocol will never become somewhat popular or even multiplatform. Things may change depending on compositor, de, os version, whatever. This is not how standards work.
Sigh. The terminal can only send on what the "system" sends to it.
Terminals are not magic. You need to go complain to whatever idiot in
GNOME decided to implement the russian layout via IME instead of key
events. *No software* that supports IME running under GNOME can report
key events for key presses in the russian layout. This is squarely an
issue with GNOME.
|
And here is an option you can use in kitty to disable IME which will allow your use case to work, regardless of GNOME and its shenanigans. 2c4ffba |
Thank you! At a minimum, this behavior is now documented and the reasons for it are clear. And thanks for the new option too. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
If "report associated text" bit (0b10000) is enabled, associated text reported only if English keyboard layout is selected. No associated text is reported for Russian (Cyrillic) keyboard layout.
To Reproduce
Steps to reproduce the behavior:
\x1b[=31u
ф
key (same asa
in English keyboard layout)\x1b[1092::97;u
, where 1092 is unicodeф
and 97 is corresponding latina
. But no "text-as-code-point" field at all!a
key\x1b[97;;97u
so "text-as-code-point" field is on it's place.Environment details
Additional context
Still reproduces with
kitty --config NONE
The text was updated successfully, but these errors were encountered: