Alan Coopersmith wrote:
> Charles Cox wrote:
>> I don't know if the problem here is Xorg not sending the correct
>> keycodes or Gnome just ignoring them. I'm leaning towards the latter
>> since one of them does work.
>>
>> Does anybody know how to troubleshoot this?
>
> /usr/bin/xev can show you the keycodes an X client receives when you press
> those keys, which should help determine if it's the Xorg side at fault.
OK, I got some data with xev. I have a shortcut for Mod4+T that opens a gedit
window. This one works correctly. Here's what xev shows when I press Mod4+T :
KeyPress event, serial 147, synthetic NO, window 0x3c00002,
root 0x41b, subw 0x0, time 167290947, (134,47), root:(656,103),
state 0x10, keycode 115 (keysym 0xffe7, Meta_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeymapNotify event, serial 150, synthetic NO, window 0x0,
keys: 27 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
KeyRelease event, serial 150, synthetic NO, window 0x3c00002,
root 0x41b, subw 0x0, time 167292619, (134,47), root:(656,103),
state 0x50, keycode 115 (keysym 0xffe7, Meta_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeymapNotify event, serial 150, synthetic NO, window 0x0,
keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
KeymapNotify event, serial 150, synthetic NO, window 0x0,
keys: 27 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
I weeded out a bunch of MotionNotify and FocusIn/Out that I think are the
result
of the gedit window being created. I see the "Mod4" (aka Meta_L) press but not
the "t". Perhaps this means that Gnome is correctly intercepting that and
performing the shortcut action as desired.
I have another action defined for Mod4+X which does not work. Here's what xev
shows when I press that combination:
KeyPress event, serial 150, synthetic NO, window 0x3c00002,
root 0x41b, subw 0x0, time 167439503, (121,57), root:(643,113),
state 0x10, keycode 115 (keysym 0xffe7, Meta_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 150, synthetic NO, window 0x3c00002,
root 0x41b, subw 0x0, time 167440255, (121,57), root:(643,113),
state 0x50, keycode 53 (keysym 0x78, x), same_screen YES,
XLookupString gives 1 bytes: (78) "x"
XmbLookupString gives 1 bytes: (78) "x"
XFilterEvent returns: False
KeyRelease event, serial 150, synthetic NO, window 0x3c00002,
root 0x41b, subw 0x0, time 167440335, (121,57), root:(643,113),
state 0x50, keycode 53 (keysym 0x78, x), same_screen YES,
XLookupString gives 1 bytes: (78) "x"
XFilterEvent returns: False
KeyRelease event, serial 150, synthetic NO, window 0x3c00002,
root 0x41b, subw 0x0, time 167440615, (121,57), root:(643,113),
state 0x50, keycode 115 (keysym 0xffe7, Meta_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Here I see the "Mod4" and the "x" separately, so I think this means that Gnome
is simply not responding to this combination and letting it pass to xev, right?
I'm thinking at this point that the problem is with Gnome. I found the
definitions of the two shortcuts in
$HOME/.gconf/desktop/gnome/keybindings/custom[01]/%gconf.xml and the format is
identical:
custom0:
<?xml version="1.0"?>
<gconf>
<entry name="action" mtime="1265747839" type="string">
<stringvalue>gedit --new-window</stringvalue>
</entry>
<entry name="name" mtime="1265747839" type="string">
<stringvalue>gedit</stringvalue>
</entry>
<entry name="binding" mtime="1265747845" type="string">
<stringvalue><Mod4>t</stringvalue>
</entry>
</gconf>
custom1:
<?xml version="1.0"?>
<gconf>
<entry name="action" mtime="1265747900" type="string">
<stringvalue>xterm</stringvalue>
</entry>
<entry name="name" mtime="1265747900" type="string">
<stringvalue>window</stringvalue>
</entry>
<entry name="binding" mtime="1265747904" type="string">
<stringvalue><Mod4>x</stringvalue>
</entry>
</gconf>
Any ideas how to debug why Gnome isn't picking up the second one?