Skip to content

Commit

Permalink
Fix shift-tab on unix
Browse files Browse the repository at this point in the history
Shift-tab didn't generate a "key char event" on unix, because
XK_ISO_Left_Tab was not mapped in xkeysym2ucs4, so its unicode code
point was mapped to 0. Map it to tab (9).
  • Loading branch information
smalltalking committed Dec 24, 2019
1 parent 6bedd67 commit 9de5fee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion platforms/unix/vm-display-X11/sqUnixX11.c
Original file line number Diff line number Diff line change
Expand Up @@ -2417,7 +2417,10 @@ static int xkeysym2ucs4(KeySym keysym)
return keysym & 0x007f;
if (keysym == XK_KP_Equal)
return XK_equal;

# if defined(XK_ISO_Left_Tab)
if (keysym == XK_ISO_Left_Tab) /* make shift-tab work */
return 9;
#endif

/* explicitly mapped */
#define map(lo, hi) if (keysym >= 0x##lo && keysym <= 0x##hi) return ucs4_##lo##_##hi[keysym - 0x##lo];
Expand Down

0 comments on commit 9de5fee

Please sign in to comment.