summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenno Schulenberg <bensberg@telfort.nl>2022-01-26 16:55:50 +0100
committerBenno Schulenberg <bensberg@telfort.nl>2022-01-26 17:12:26 +0100
commitfbbc3cf8b8b03f74f778772d4703fc4fec242282 (patch)
treed747b7ee5c4dfc186421418aba2c792156f76ddb
parent6786744f636b3fc545157a13cb2f6169b5be9fa5 (diff)
downloadxorg-lib-libX11-fbbc3cf8b8b03f74f778772d4703fc4fec242282.tar.gz
XKBCvt: remove an if that never gets triggered
The 'if' at the beginning of _XkbHandleSpecialSym() allows only symbols from the numeric keypad and some control symbols to pass -- XK_hyphen is not among them, so the check for XK_hyphen in the later 'if' will always be false. (The corresponding conversion in _XTranslateKeySym() in KeyBind.c was removed in March 1994.) (Also, several keyboard layouts nowadays contain the 'hyphen' symbol, allowing the user to enter soft hyphens into a document. So we really don't want to remap this symbol.) Fixes issue #48. Reported-by: Bhavi Dhingra Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
-rw-r--r--src/xkb/XKBCvt.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/xkb/XKBCvt.c b/src/xkb/XKBCvt.c
index 5317a0a5..77d09a3d 100644
--- a/src/xkb/XKBCvt.c
+++ b/src/xkb/XKBCvt.c
@@ -75,8 +75,6 @@ _XkbHandleSpecialSym(KeySym keysym, char *buffer, int nbytes, int *extra_rtrn)
/* if X keysym, convert to ascii by grabbing low 7 bits */
if (keysym == XK_KP_Space)
buffer[0] = XK_space & 0x7F; /* patch encoding botch */
- else if (keysym == XK_hyphen)
- buffer[0] = (char) (XK_minus & 0xFF); /* map to equiv character */
else
buffer[0] = (char) (keysym & 0x7F);
return 1;