Skip to content
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

Kitty keyboard: incorrect handling of shifted keys #10

Open
rockorager opened this issue Jan 22, 2025 · 5 comments
Open

Kitty keyboard: incorrect handling of shifted keys #10

rockorager opened this issue Jan 22, 2025 · 5 comments

Comments

@rockorager
Copy link
Contributor

Reproducer

kitten show-key -m kitty

Press ":" on us layout (shift + ;)

Expected output

CSI 59 : 58 ; 2 ; 58 u

Actual output

CSI 58 ; 2 ; 58 u

Issue

We need to get the physical key from xkb. Using wev I can see this is delivered as "key: 47" for both a ';' press and a 'shift + ;' press, but I can't see how to get this information from xkb directly in wraith. Ultimately, this will need to be used to set the input.KeyEvent key, physical_key, and unshifted_codepoint just before the keyCallback function.

@ferrreo
Copy link
Contributor

ferrreo commented Jan 22, 2025

How does foot handle this or is it just wrong?

@rockorager
Copy link
Contributor Author

Foots output is the same as expected, which matches Ghostty core:

CSI 59 : 58 ; 2 : 1 ; 58 u

@gabydd
Copy link
Owner

gabydd commented Feb 4, 2025

I have seen something similar with shift tab not working, will look into it

@gabydd
Copy link
Owner

gabydd commented Feb 5, 2025

ah shift tab was me just not handling an enum so a bit different, correct me if I am wrong but the problem here is we are sending the shifted key and we need to get the unshifted one I think we just need to get the level 0 keyboard to do this(https://xkbcommon.org/doc/current/group__components.html#gad92b9334170316926595fbb5d634a181), it looks like this is what foot does as well

@rockorager
Copy link
Contributor Author

rockorager commented Feb 5, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants