[Xlib] tab key KeySym
Lucien Gentis
lucien.gentis at waika9.com
Fri Feb 7 16:27:59 UTC 2020
Hello,
I have to extract the KeySym of the key I press with and without holding
down Shift key.
If I use :
keysym=XkbKeycodeToKeysym(display,event.xkey.keycode,0,0);
keysym contains 0xff09 for tab key wether I hold down Shift key or not.
But I have to extract keysyms for multibytes character, so I use :
XmbLookupString(ic, (XKeyPressedEvent *)&event, buffer, buf_len,&keysym,
&status);
And yet, without holding down Shift key, keysym still contains 0xff09,
but if I hold down Shift key, keysym contains 0xfe20.
It seems that tab key is the only one whose KeySym is modified by Shift key.
Could someone explain the reason of this behavior ?
PS : xev says :
(blocks 1 and 2 : tab key without Shift
blocks 3, 4 and 5 : tab key with Shift)
KeyPress event, serial 37, synthetic NO, window 0x4a00001,
root 0x6b0, subw 0x0, time 10642675, (362,198), root:(893,693),
state 0x10, keycode 23 (*keysym 0xff09*, Tab), same_screen YES,
XLookupString gives 1 bytes: (09) " "
XmbLookupString gives 1 bytes: (09) " "
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x4a00001,
root 0x6b0, subw 0x0, time 10642779, (362,198), root:(893,693),
state 0x10, keycode 23 (*keysym 0xff09*, Tab), same_screen YES,
XLookupString gives 1 bytes: (09) " "
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x4a00001,
root 0x6b0, subw 0x0, time 10651291, (362,198), root:(893,693),
state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x4a00001,
root 0x6b0, subw 0x0, time 10656139, (362,198), root:(893,693),
state 0x11, keycode 23 (*keysym 0xfe20*, ISO_Left_Tab), same_screen
YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x4a00001,
root 0x6b0, subw 0x0, time 10656211, (362,198), root:(893,693),
state 0x11, keycode 23 (*keysym 0xfe20*, ISO_Left_Tab), same_screen
YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-devel/attachments/20200207/ef1ee927/attachment.htm>
More information about the xorg-devel
mailing list