terminator icon indicating copy to clipboard operation
terminator copied to clipboard

Keyboard shortcuts using numeric keyboard does not work

Open perlun opened this issue 3 years ago • 3 comments
trafficstars

Describe the bug Keyboard shortcuts using numeric keyboard does not work

To Reproduce One particular example is Ctrl-+ and Ctrl-- for increasing/decreasing font size. It works perfectly when pressing + and - on the regular (non-numeric) keyboard, but whenever I press + or - from the numeric keyboard nothing happens.

I've tried going into the preferences and changing the keybindings (pressing Ctrl-+ on the numeric keyboard when changing the binding) but it doesn't seem to help.

Expected behavior Numeric keyboard keys should work just like other keys.

Desktop (please complete the following information):

  • OS or Linux Distribution: Debian GNU/Linux
  • Version: 11 (bullseye)
  • Package version: 2.1.0-2
  • Display Technology: X11

perlun avatar Mar 18 '22 07:03 perlun

Tested with the 2.1.1-1 package from bookworm (next version of Debian, currently in testing) but the problem persists in that version also.

perlun avatar Mar 18 '22 07:03 perlun

If it was working but no longer is then it probably has to do with the mapping info for numpad. When working, it's probably b/c <Ctrl>+= is how it's defined. But, you need <Ctrl>++ for numpad to work. If you right click and go to preferences and keybindings does the zoom setting show as one or the other?

maximstewart avatar Mar 23 '22 14:03 maximstewart

Thanks for your reply @maximstewart. I'm not sure it has worked before. Here's what it looks like in the preferences:

image

If I edit the setting by pressing Ctrl+numeric +, it sets it to exactly the same value: Ctrl++.

Interestingly enough, using Ctrl + non-numeric + (=) works. Likewise with Ctrl + non-numeric minus and Ctrl + non-numeric zero.


(Interestingly enough, when I try to set the zoom_in to any other random key it always stays as Ctrl++ so perhaps there's some other underlying issue. :thinking: My ~/.config/terminator/config file is a symlink, but Terminator typically does try to make some changes to it so I think it can properly persist config changes to it... I guess I could try without a symlink at some point. I tend to keep it symlinked so I can have it git-managed and use a uniform Terminator config on all machines I use.)

perlun avatar Apr 27 '22 07:04 perlun

For the reference, this is still an open issue for me (I was just annoyed by it again which led me here :grin:).

  • Ctrl-+ works when using non-numeric +
  • Ctrl-+ with numeric keypad does not work, despite being set correctly above.

Any ideas on how to debug this further? :thinking:

perlun avatar Oct 12 '22 11:10 perlun

@perlun Sorry, I didn't notice the update stating you had replied to my prior post. I'm on ver 2.1.1 and using Manjaro. Num pad + and - work for me which makes me think there's something else going on. Also, symlinks wont affect it in so far as I'm aware. I'm unsure how to debug further. Silly question but are you sure your num lock is on?

maximstewart avatar Oct 12 '22 14:10 maximstewart

No worries @maximstewart. I tried now (on another keyboard, since WFH). Same problem here, Ctrl-+, Ctrl-0 etc does not work when using the numeric keypad. Ctrl-0 even emits a "0" in the terminal in question. Num Lock is definitely verified to be turned on in this case.

Interestingly enough, I started suspecting that this was a conflict with https://github.com/ssokolow/quicktile which is also bound to use somewhat similar keys (Ctrl-Alt-0, which is correctly picked up by Quicktile), but... I killed it and the problem still remains. :disappointed:

Any ideas on what more we could try? Here's what xev outputs when running in this Terminator window, pressing Ctrl-0 on the numeric keypad:

KeyPress event, serial 38, synthetic NO, window 0x8e00001,
    root 0x946, subw 0x0, time 378857, (0,-350), root:(2791,97),
    state 0x2010, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 38, synthetic NO, window 0x8e00001,
    root 0x946, subw 0x0, time 378993, (0,-350), root:(2791,97),
    state 0x2014, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XmbLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 38, synthetic NO, window 0x8e00001,
    root 0x946, subw 0x0, time 379074, (0,-350), root:(2791,97),
    state 0x2014, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 38, synthetic NO, window 0x8e00001,
    root 0x946, subw 0x0, time 379290, (0,-350), root:(2791,97),
    state 0x2014, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

perlun avatar Oct 17 '22 06:10 perlun

@perlun Hmmm, okay, what kind of keyboards are you using? I'm using a Keychron K10 in mac mode. In addition, maybe you could try a live OS from USB? (Different from your Debian such as Manjaro or Ubuntu) Also, you mentioned something that's interesting to me. I have a separate key on my numpad that is a +. What you describe seems like the plus symbol is a function only option and just 0 by default? So, as you kinda were thinking maybe mapping is getting mixed up given we do see a ++ when you try setting to it.

My xev comes out as =/:

` KeyPress event, serial 48, synthetic NO, window 0x7200001, root 0x1df, subw 0x0, time 355420329, (89,75), root:(2761,717), state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False

KeyPress event, serial 48, synthetic NO, window 0x7200001, root 0x1df, subw 0x0, time 355420790, (89,75), root:(2761,717), state 0x14, keycode 86 (keysym 0xffab, KP_Add), same_screen YES, XLookupString gives 1 bytes: (2b) "+" XmbLookupString gives 1 bytes: (2b) "+" XFilterEvent returns: False

KeyRelease event, serial 48, synthetic NO, window 0x7200001, root 0x1df, subw 0x0, time 355420909, (89,75), root:(2761,717), state 0x14, keycode 86 (keysym 0xffab, KP_Add), same_screen YES, XLookupString gives 1 bytes: (2b) "+" XFilterEvent returns: False `

maximstewart avatar Oct 24 '22 04:10 maximstewart

I also noticed that the zoom_normal setting is set to a ctrl+zero in the picture you sent above. Maybe it's overriding/conflicting the ctrl++. That is to say, it could be zooming in but then resets because the other is firing. OR that the other fires only and outright overrides the ++.

maximstewart avatar Oct 24 '22 04:10 maximstewart

What you describe seems like the plus symbol is a function only option and just 0 by default?

Ah, unclear on my behalf @maximstewart. Both Ctrl-+ and Ctrl-0 are malfunctioning when using the + and 0 keys on the numeric keyboard (probably the same with Ctrl--). In the xev example above, I used Ctrl-0.

The keyboard in question is a Das Keyboard Ultimate.

perlun avatar Oct 26 '22 17:10 perlun

@perlun

Alright, it was mostly a shot in the dark. Did you see my other comment, by the way?

"I also noticed that the zoom_normal setting is set to a ctrl+zero in the picture you sent above. Maybe it's overriding/conflicting the ctrl++. That is to say, it could be zooming in but then resets because the other is firing. OR that the other fires only and outright overrides the ++."

Look at the image where you highlighted with a red box. zoom_in is defined with ++ while zoom_normal is defined with a +0. Try and remove the binding from zoom_normal. Then set zoom_in to your keypad. Does that do anything? I ask because your xev shows as just +0 and am wondering if zoom_normal is overriding zoom_in even though zoom_in shows as "++".

maximstewart avatar Oct 28 '22 00:10 maximstewart

Ah, sorry @maximstewart - I saw that comment but I must admit I didn't paid a lot of attention to it (to my own shame). Sorry for this. I now tested doing exactly what you suggested (removing the binding and setting it again) and you know what - it works flawlessly! :tada: :astonished:

So https://github.com/perlun/dotfiles/commit/10e90fc9e7fa457e468f12a257c7041b0bb88c11 fixes this in my (dotfiles-tracked) Terminator config. Thanks a lot for the help, this was probably more a user stupidity error than anything else. :grin:

(Here's what it looks now after changing these settings. I wonder if it would be possible to to render Ctrl++ here as Ctrl+KP_+ or something, that would actually make it slightly clearer to the end user that + and "keypad +" are two different keys. :thinking: But anyway, I'm very happy to see this resolved as far as I'm personally concerned.)

image

perlun avatar Nov 15 '22 13:11 perlun

@perlun No worries and glad it's all resolved! =)

maximstewart avatar Nov 17 '22 06:11 maximstewart