<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>I have to extract the KeySym of the key I press with and without
holding down Shift key.</p>
<p>If I use :</p>
<p>keysym=XkbKeycodeToKeysym(display,event.xkey.keycode,0,0);</p>
<p>keysym contains 0xff09 for tab key wether I hold down Shift key
or not.</p>
<p>But I have to extract keysyms for multibytes character, so I use
:</p>
<p>XmbLookupString(ic, (XKeyPressedEvent *)&event, buffer,
buf_len,&keysym, &status);</p>
<p>And yet, without holding down Shift key, keysym still contains
0xff09, but if I hold down Shift key, keysym contains 0xfe20.</p>
<p>It seems that tab key is the only one whose KeySym is modified by
Shift key.<br>
</p>
<p>Could someone explain the reason of this behavior ?<br>
</p>
<p><br>
</p>
<p>PS : xev says :</p>
<p>(blocks 1 and 2 : tab key without Shift</p>
<p>blocks 3, 4 and 5 : tab key with Shift)</p>
<p>KeyPress event, serial 37, synthetic NO, window 0x4a00001,<br>
root 0x6b0, subw 0x0, time 10642675, (362,198),
root:(893,693),<br>
state 0x10, keycode 23 (<b>keysym 0xff09</b>, Tab),
same_screen YES,<br>
XLookupString gives 1 bytes: (09) " "<br>
XmbLookupString gives 1 bytes: (09) " "<br>
XFilterEvent returns: False<br>
<br>
KeyRelease event, serial 37, synthetic NO, window 0x4a00001,<br>
root 0x6b0, subw 0x0, time 10642779, (362,198),
root:(893,693),<br>
state 0x10, keycode 23 (<b>keysym 0xff09</b>, Tab),
same_screen YES,<br>
XLookupString gives 1 bytes: (09) " "<br>
XFilterEvent returns: False<br>
<br>
KeyPress event, serial 37, synthetic NO, window 0x4a00001,<br>
root 0x6b0, subw 0x0, time 10651291, (362,198),
root:(893,693),<br>
state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen
YES,<br>
XLookupString gives 0 bytes: <br>
XmbLookupString gives 0 bytes: <br>
XFilterEvent returns: False<br>
<br>
KeyPress event, serial 37, synthetic NO, window 0x4a00001,<br>
root 0x6b0, subw 0x0, time 10656139, (362,198),
root:(893,693),<br>
state 0x11, keycode 23 (<b>keysym 0xfe20</b>, ISO_Left_Tab),
same_screen YES,<br>
XLookupString gives 0 bytes: <br>
XmbLookupString gives 0 bytes: <br>
XFilterEvent returns: False<br>
<br>
KeyRelease event, serial 37, synthetic NO, window 0x4a00001,<br>
root 0x6b0, subw 0x0, time 10656211, (362,198),
root:(893,693),<br>
state 0x11, keycode 23 (<b>keysym 0xfe20</b>, ISO_Left_Tab),
same_screen YES,<br>
XLookupString gives 0 bytes: <br>
XFilterEvent returns: False<br>
<br>
</p>
<p><br>
</p>
</body>
</html>