GNOME Bugzilla – Bug 368034
keyboard shortcuts are oblivious to numlock being on/off
Last modified: 2020-11-06 20:05:55 UTC
Please describe the problem: When setting workspace shortcuts to keypad (end -> 1, down -> 2 ....ins -> 10) the settings recognize the difference between "1" on the keypad and "end", but when using it to change workspaces, both "1" and "end" switch to workspace 1 Steps to reproduce: 1. set "Switch to workspace 1" under keyboard shortcuts to keypad "end" 2. exit settings and press "end" on keypad...this switches to workspace 1 3. turn numlock on and press "1" on keypad...this also switches to workspace 1 Actual results: they both change to workspace 1 Expected results: one would change to workspace 1, and the other would be the same as a keyboard input of "1" Does this happen every time? yes Other information:
These shortcuts are interpreted by metacity. Reassigning.
Please reconsider this bug. It still exists as of gnome-shell-3.4.2 (although it probably applies to mutter rather than metacity now). On Gnome 3.4, reproduce by navigating to gsettings key "org.gnome.desktop.wm.keybindings", set a shortcut such as switching to a particular workspace to ['KP_End']. Expected result is that pressing 1/End on numpad with numlock OFF triggers the shortcut and pressing the same key with numlock ON inserts the character "1" in text. Actual behaviour is that the shortcut is triggered regardless of numlock setting.
Created attachment 224313 [details] [review] Patch to fix the described problem (dirty hack) A little digging in the code shows that numlock is an "annoying" modifier which is completely ignored by keybindings, so the problem described in the report appears to be somewhat by design. My patch is not a good solution, but it fixes the problem for everybody who is bothered by the inability to use the numpad in the described fashion, and perhaps it will inspire a better solution. Applies to mutter-3.4.1 and perhaps other versions.
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports in Bugzilla which have not seen updates for many years. If you can still reproduce this issue in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/metacity/-/issues/ Thank you for reporting this issue and we are sorry it could not be fixed.