patch 8.2.0830: Motif: can't map "!"
Problem: Motif: can't map "!". (Ben Jackson)
Solution: Remove the shift modifier if it's already included in the key.
(closes #6147)
diff --git a/src/gui_x11.c b/src/gui_x11.c
index c03b210..1eec793 100644
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -948,6 +948,11 @@
{
string[0] = key;
len = 1;
+
+ // Remove the SHIFT modifier for keys where it's already included,
+ // e.g., '(', '!' and '*'.
+ if (!ASCII_ISALPHA(key) && key > 0x20 && key < 0x7f)
+ modifiers &= ~MOD_MASK_SHIFT;
}
if (modifiers != 0)