Sending Shift key to Linuc
Posted: Fri Apr 20, 2012 8:15 pm
I'm using Remoter VNC over SSH tunnel to access a Centos 5 box running vncserver. I can't send any uppercase or shifted keys to the remote system.
I ran xev (X event viewer) to capture the keyboard events and this is what I saw...
KeyPress event, serial 27, synthetic NO, window 0x2e00001,
root 0x3a, subw 0x0, time 3526189530, (94,122), root:(822,301),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 27, synthetic NO, window 0x2e00001,
root 0x3a, subw 0x0, time 3526190170, (94,122), root:(822,301),
state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 27, synthetic NO, window 0x2e00001,
root 0x3a, subw 0x0, time 3526190170, (94,122), root:(822,301),
state 0x0, keycode 40 (keysym 0x64, d), same_screen YES,
XLookupString gives 1 bytes: (64) "d"
XmbLookupString gives 1 bytes: (64) "d"
XFilterEvent returns: False
KeyPress event, serial 27, synthetic NO, window 0x2e00001,
root 0x3a, subw 0x0, time 3526190170, (94,122), root:(822,301),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 27, synthetic NO, window 0x2e00001,
root 0x3a, subw 0x0, time 3526190178, (94,122), root:(822,301),
state 0x1, keycode 40 (keysym 0x44, D), same_screen YES,
XLookupString gives 1 bytes: (44) "D"
XFilterEvent returns: False
KeyRelease event, serial 27, synthetic NO, window 0x2e00001,
root 0x3a, subw 0x0, time 3526190184, (94,122), root:(822,301),
state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Notice the sequence of events...
Shift key press
Shift key release!!!!
'd' key press
Shift key press!!!
'D' key release
Shift key release
When I compare the events from another VNC client (Chicken on Mac) I see the following (sane) event sequence.
Shift key press
'd' key press
'D' key release
Shift key release
Somehow extra events are getting pumped in, and it is fouling up my Linux sessions.
BTW the same events are generate when I use my bluetooth keyboard (ZaggMate) with the physical shift key, the bluetooth keyboard with the on-screen shift key, or the onscreen keyboard.
Also capslock does not work, though I haven't debugged the events there.
I ran xev (X event viewer) to capture the keyboard events and this is what I saw...
KeyPress event, serial 27, synthetic NO, window 0x2e00001,
root 0x3a, subw 0x0, time 3526189530, (94,122), root:(822,301),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 27, synthetic NO, window 0x2e00001,
root 0x3a, subw 0x0, time 3526190170, (94,122), root:(822,301),
state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 27, synthetic NO, window 0x2e00001,
root 0x3a, subw 0x0, time 3526190170, (94,122), root:(822,301),
state 0x0, keycode 40 (keysym 0x64, d), same_screen YES,
XLookupString gives 1 bytes: (64) "d"
XmbLookupString gives 1 bytes: (64) "d"
XFilterEvent returns: False
KeyPress event, serial 27, synthetic NO, window 0x2e00001,
root 0x3a, subw 0x0, time 3526190170, (94,122), root:(822,301),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 27, synthetic NO, window 0x2e00001,
root 0x3a, subw 0x0, time 3526190178, (94,122), root:(822,301),
state 0x1, keycode 40 (keysym 0x44, D), same_screen YES,
XLookupString gives 1 bytes: (44) "D"
XFilterEvent returns: False
KeyRelease event, serial 27, synthetic NO, window 0x2e00001,
root 0x3a, subw 0x0, time 3526190184, (94,122), root:(822,301),
state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Notice the sequence of events...
Shift key press
Shift key release!!!!
'd' key press
Shift key press!!!
'D' key release
Shift key release
When I compare the events from another VNC client (Chicken on Mac) I see the following (sane) event sequence.
Shift key press
'd' key press
'D' key release
Shift key release
Somehow extra events are getting pumped in, and it is fouling up my Linux sessions.
BTW the same events are generate when I use my bluetooth keyboard (ZaggMate) with the physical shift key, the bluetooth keyboard with the on-screen shift key, or the onscreen keyboard.
Also capslock does not work, though I haven't debugged the events there.