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 145271 - Unknown keyboard shortcut names are translated to keycode 0 causing problems
Unknown keyboard shortcut names are translated to keycode 0 causing problems
Status: RESOLVED FIXED
Product: libegg
Classification: Other
Component: treeviewutils
unspecified
Other Linux
: High normal
: ---
Assigned To: gtktreeview-bugs
Libegg maintenance
Depends on:
Blocks:
 
 
Reported: 2004-07-01 21:16 UTC by Vesa Halttunen
Modified: 2006-07-29 13:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A trivial patch for checking if the returned keyval is 0 (643 bytes, patch)
2004-07-01 21:17 UTC, Vesa Halttunen
none Details | Review

Description Vesa Halttunen 2004-07-01 21:16:21 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.
Comment 1 Vesa Halttunen 2004-07-01 21:17:05 UTC
Created attachment 29142 [details] [review]
A trivial patch for checking if the returned keyval is 0
Comment 2 Frederic Crozat 2004-10-08 16:07:14 UTC
Reassign to libegg, since eggaccelerator is from there..
Comment 3 Kjartan Maraas 2005-01-25 17:49:12 UTC
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?
Comment 4 Bastien Nocera 2006-01-11 18:38:31 UTC
*Grumble*
They should have been kept in sync.
Comment 5 Vincent Untz 2006-07-29 13:37:06 UTC
This is in CVS since a long time...