diff options
-rw-r--r-- | src/gui_x11.c | 4 | ||||
-rw-r--r-- | src/misc2.c | 9 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/src/gui_x11.c b/src/gui_x11.c index 540f143e2a..fc63658f8d 100644 --- a/src/gui_x11.c +++ b/src/gui_x11.c @@ -936,11 +936,11 @@ gui_x11_key_hit_cb( } else { - len = mb_char2bytes(key, string); - // Some keys need adjustment when the Ctrl modifier is used. key = may_adjust_key_for_ctrl(modifiers, key); + len = mb_char2bytes(key, string); + // Remove the SHIFT modifier for keys where it's already included, // e.g., '(', '!' and '*'. modifiers = may_remove_shift_modifier(modifiers, key); diff --git a/src/misc2.c b/src/misc2.c index e3602ee4b8..6133a5e93b 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -1543,7 +1543,7 @@ find_special_key( int may_adjust_key_for_ctrl(int modifiers, int key) { - if (!(modifiers & MOD_MASK_CTRL)) + if ((modifiers & MOD_MASK_CTRL) == 0) return key; if (ASCII_ISALPHA(key)) @@ -1559,6 +1559,13 @@ may_adjust_key_for_ctrl(int modifiers, int key) return '^'; if (key == '-') return '_'; + + // On a Belgian keyboard AltGr $ is ']', on other keyboards '$' can only be + // obtained with Shift. Assume that '$' without shift implies a Belgian + // keyboard, where CTRL-$ means CTRL-]. + if (key == '$' && (modifiers & MOD_MASK_SHIFT) == 0) + return ']'; + return key; } diff --git a/src/version.c b/src/version.c index 524abf792f..058c712eba 100644 --- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1302, +/**/ 1301, /**/ 1300, |