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

Left Control Key doesn't work on External Keyboard #2362

Closed
khamer opened this issue Feb 13, 2020 · 5 comments
Closed

Left Control Key doesn't work on External Keyboard #2362

khamer opened this issue Feb 13, 2020 · 5 comments

Comments

@khamer
Copy link

khamer commented Feb 13, 2020

I'm at a loss, but I'm only seeing this problem with kitty - my other terminals/applications work fine.

Here's the output from kitty --debug-keyboard from hitting left control + l, which doesn't work:

Press xkb_keycode: 0x25 clean_sym: Control_L composed_sym: Control_L mods: none glfw_key: 341 (LEFT CONTROL) xkb_key: 65507 (Control_L)
on_key_input: glfw key: 341 native_code: 0xffe3 action: PRESS mods: 0x0 text: '' state: 0 sent key to child
Press xkb_keycode: 0x2e clean_sym: l composed_sym: l mods: none glfw_key: 76 (L) xkb_key: 108 (l)
on_key_input: glfw key: 76 native_code: 0x6c action: PRESS mods: 0x0 text: '' state: 0 sent key to child
Release xkb_keycode: 0x2e clean_sym: l mods: none glfw_key: 76 (L) xkb_key: 108 (l)
on_key_input: glfw key: 76 native_code: 0x6c action: RELEASE mods: 0x0 text: '' state: 0 ignoring as keyboard mode does not allow release events
Release xkb_keycode: 0x25 clean_sym: Control_L mods: none glfw_key: 341 (LEFT CONTROL) xkb_key: 65507 (Control_L)
on_key_input: glfw key: 341 native_code: 0xffe3 action: RELEASE mods: 0x0 text: '' state: 0 ignoring as keyboard mode does not allow release events

and here's the the same thing for right control + l, which does work:

Press xkb_keycode: 0x25 clean_sym: Control_L composed_sym: Control_L mods: none glfw_key: 341 (LEFT CONTROL) xkb_key: 65507 (Control_L)
on_key_input: glfw key: 341 native_code: 0xffe3 action: PRESS mods: 0x0 text: '' state: 0 sent key to child
Press xkb_keycode: 0x2e clean_sym: l composed_sym: l mods: ctrl glfw_key: 76 (L) xkb_key: 108 (l)
on_key_input: glfw key: 76 native_code: 0x6c action: PRESS mods: 0x2 text: '' state: 0 sent key to child
Release xkb_keycode: 0x25 clean_sym: Control_L mods: ctrl glfw_key: 341 (LEFT CONTROL) xkb_key: 65507 (Control_L)
on_key_input: glfw key: 341 native_code: 0xffe3 action: RELEASE mods: 0x2 text: '' state: 0 ignoring as keyboard mode does not allow release events
Release xkb_keycode: 0x2e clean_sym: l mods: none glfw_key: 76 (L) xkb_key: 108 (l)
on_key_input: glfw key: 76 native_code: 0x6c action: RELEASE mods: 0x0 text: '' state: 0 ignoring as keyboard mode does not allow release events

The meaningful difference I see is the first one shows mods: none and the second doesn't. Why would kitty do this? Any insights?

I'm using Manjaro/i3wm/kitty 0.16.0

@khamer
Copy link
Author

khamer commented Feb 13, 2020

better information - the problem is that if I hold control on one keyboard and hit the key on the other, it doesn't work, and I have a split keyboard which probably shows up as two keyboards.

I can confirm above too by trying to use a mix of control of the laptop keyboard and c, d, or l on the external keyboard, or either control on external keyboard with c, d, or l on the laptop keyboard.

Again, this is an issue I only see in kitty - all my other applications don't seem to care what keys I press on what keyboard.

@kovidgoyal
Copy link
Owner

Well I'm afraid I dont have a lot of interest in debugging issues using multiple keyboards simultaneously, but patches are welcome. The relevant code is in xkb_glfw.c Most likely this has something to do with per keyboard contexts.

@kovidgoyal
Copy link
Owner

This patch might help: c7c14f1

if not let me know.

@khamer
Copy link
Author

khamer commented Jun 8, 2020

@kovidgoyal I built kitty from source from 5f6aa1b (master) and this still doesn't work - shift does (it did before) but alt and control don't.

Also, so I don't seem totally crazy, the reason I even found this bug was because I was using a keyboard similar to this, which shows up to the system as two keyboards. It's definitely a less popular use case. I did try adding more logging to try to figure out what change needs to happen but didn't get too far - I'll try to dig a little more again.

Thanks anyway!

@khamer
Copy link
Author

khamer commented Jun 24, 2020

Awesome - I know you closed it already, but just wanted to say thanks - confirmed it's working for me too.

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

2 participants