GNOME Bugzilla – Bug 145271
Unknown keyboard shortcut names are translated to keycode 0 causing problems
Last modified: 2006-07-29 13:37:06 UTC
If the user uses a keymap which defines a keysym for a certain keycode, defines a keyboard shortcut using that symbol name, switches to another keymap (because (s)he bought a new keyboard, for example) and logs in gnome-settings-daemon can lock up the keyboard if the keysym is not defined in the new keymap. This happens because XKeysymToKeycode returns 0 for the keyval in eggaccelerators.c. There is a check for this in eggaccelerators.c but only in the "maybe it's a keycode" case, not the "normal" case. To reproduce the bug do the following: - Use a keymap that doesn't have XF86Mail (for example) defined - Use xmodmap to define a keycode for XF86Mail: xmodmap -e "keycode SOME-KEY-CODE = XF86Mail" - Open the Keyboard Shortcuts control panel - Define a shortcut using the XF86Mail key you just defined - Log out - Log in - now XF86Mail is not defined anymore - Keyboard is locked because gnome-settings-daemon translates XF86Mail to 0 Bug 135031 is related to this but doesn't fix this. I've attached a trivial patch that checks if XKeysymToKeycode returns 0 and marks it as bad_keyval as is done in the "maybe it's a keycode" case.
Created attachment 29142 [details] [review] A trivial patch for checking if the returned keyval is 0
Reassign to libegg, since eggaccelerator is from there..
This doesn't apply to the version in libegg at all. It seems development has been done in gnome-control-center instead of in the original copy...what to do?
*Grumble* They should have been kept in sync.
This is in CVS since a long time...