After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 606727 - Can't bind keys on numerical keypad with numlock on
Can't bind keys on numerical keypad with numlock on
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-01-12 11:28 UTC by Kamil Páral
Modified: 2011-11-16 18:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kamil Páral 2010-01-12 11:28:58 UTC
I can use gnome-keybinding-properties to create almost any shortcut for any action. But there is a problem when binding keys from a numerical keypad (numpad) with numlock on. For example I want to bind Mod4+1 (from numpad). I press that binding and it is written in the Shortcut column as:
Mod4+1 (shouldn't that be KP_1?)
But if I then press Mod4+1 (from numpad), nothing is executed.

On the contrary if I turn numlock off, I can bind eg.:
Mod4+KP_End
And that shortcut works.

I can also bind:
Mod4+1 (from keyboard part)
And that also works.

Only the ten numbers from numpad with numlock on doesn't work. Which is very inconvenient, because I always have numlock on and I would like to use such shortcuts.

PS: You can substitute Shift/Alt/Control for Mod4, it doesn't matter, same case.

Fedora 12
control-center-2.28.1-12.fc12.x86_64
Comment 1 Jens Granseuer 2010-01-12 18:05:45 UTC
I see different behaviour here: While the UI shows Ctrl+7, GConf actually says <Control>KP_7, and that shortcut works, too.

Can you check what gets written to GConf, please?
* /desktop/gnome/keybindings/* for custom shortcuts
* /apps/gnome_settings_daemon/keybindings/ for g-s-d shortcuts
* /apps/metacity/* for window manager shortcuts

Also, for which keybindings does it apply? Custom, g-s-d-controlled (e.g. the volume controls), metacity-controlled (mostly window manager actions), all of them?
Comment 2 Kamil Páral 2010-01-15 11:47:03 UTC
/apps/gnome_settings_daemon/keybindings/help <Control>KP_7 - doesn't work
/apps/gnome_settings_daemon/keybindings/help <Control>KP_Home - works

/apps/metacity/window_keybindings/move_to_workspace_2 <Control>KP_7 - works
/apps/metacity/window_keybindings/move_to_workspace_2 <Control>KP_Home - works

/desktop/gnome/keybindings/custom3/binding <Control>KP_7 - doesn't work
/desktop/gnome/keybindings/custom3/binding <Control>KP_Home - works

So metacity works ok, but g-s-d and custom shortcuts doesn't.

PS: Just in case if makes any difference - I have an external keyboard connected to a notebook in the docking station.
Comment 3 Tobias Mueller 2010-07-12 08:27:14 UTC
Reopening as I think that the requested information has been provided.
Comment 4 Bastien Nocera 2011-02-09 15:30:29 UTC
Mass move to new component "Keyboard" where the keyboard shortcuts live in GNOME 3.
Comment 5 Kamil Páral 2011-11-15 13:25:55 UTC
Reproduced in Fedora 16, control-center-3.2.2-1.fc16.x86_64. Some shortcuts (like "Launch Terminal") work all the time, with NumLock on or off, but some shortcuts (e.g. all custom shortcuts) have the same problems as described.
Comment 6 Kamil Páral 2011-11-15 13:27:18 UTC
I believe this may be connected to:
https://bugzilla.redhat.com/show_bug.cgi?id=752591#c4
Comment 7 Bastien Nocera 2011-11-16 18:50:59 UTC
commit ab27fa9bba319469a077828e13945a89144115c2
Author: Bastien Nocera <hadess@hadess.net>
Date:   Wed Nov 16 18:49:54 2011 +0000

    tests: Add tests for keypad keys parsing
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=606727

commit de47b90fd10ac494fda16af4c723ed2d5f6be946
Author: Bastien Nocera <hadess@hadess.net>
Date:   Wed Nov 16 18:47:39 2011 +0000

    gtk: Parse keypad numbers correctly
    
    Try to find keycodes for keysyms at level-0 in the keymap, but don't
    fail to parse if we can find those in level-1. This fixes the
    parsing of numerical keys on the keypad, which require a shift level
    through Num-Lock.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=606727