From 885c5afec0135384958c33bab6774da2215f8bab Mon Sep 17 00:00:00 2001 From: fvogel Date: Tue, 7 Jul 2020 20:33:17 +0000 Subject: Fix [09abd739b5]: bind-13.14 fails on Debian 10. --- unix/tkUnixKey.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c index f6478ef..668be15 100644 --- a/unix/tkUnixKey.c +++ b/unix/tkUnixKey.c @@ -367,8 +367,18 @@ TkpGetKeySym( index += 1; } - sym = TkKeycodeToKeysym(dispPtr, eventPtr->xkey.keycode, 0, - index); + if (eventPtr->xkey.keycode > 0xff) { + + /* + * X11 keycodes always lie in the inclusive range [8,255]. + */ + + sym = NoSymbol; + return sym; + } else { + sym = TkKeycodeToKeysym(dispPtr, eventPtr->xkey.keycode, 0, + index); + } /* * Special handling: if the key was shifted because of Lock, but lock is -- cgit v0.12