patch 9.0.1302: on a Belgian keyboard CTRL-] does not work
Problem: On a Belgian keyboard CTRL-] does not work. Solution: Translate CTRL-$ into CTRL-]. (closes #11831)
This commit is contained in:
@ -936,11 +936,11 @@ gui_x11_key_hit_cb(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
len = mb_char2bytes(key, string);
|
|
||||||
|
|
||||||
// Some keys need adjustment when the Ctrl modifier is used.
|
// Some keys need adjustment when the Ctrl modifier is used.
|
||||||
key = may_adjust_key_for_ctrl(modifiers, key);
|
key = may_adjust_key_for_ctrl(modifiers, key);
|
||||||
|
|
||||||
|
len = mb_char2bytes(key, string);
|
||||||
|
|
||||||
// Remove the SHIFT modifier for keys where it's already included,
|
// Remove the SHIFT modifier for keys where it's already included,
|
||||||
// e.g., '(', '!' and '*'.
|
// e.g., '(', '!' and '*'.
|
||||||
modifiers = may_remove_shift_modifier(modifiers, key);
|
modifiers = may_remove_shift_modifier(modifiers, key);
|
||||||
|
|||||||
@ -1543,7 +1543,7 @@ find_special_key(
|
|||||||
int
|
int
|
||||||
may_adjust_key_for_ctrl(int modifiers, int key)
|
may_adjust_key_for_ctrl(int modifiers, int key)
|
||||||
{
|
{
|
||||||
if (!(modifiers & MOD_MASK_CTRL))
|
if ((modifiers & MOD_MASK_CTRL) == 0)
|
||||||
return key;
|
return key;
|
||||||
|
|
||||||
if (ASCII_ISALPHA(key))
|
if (ASCII_ISALPHA(key))
|
||||||
@ -1559,6 +1559,13 @@ may_adjust_key_for_ctrl(int modifiers, int key)
|
|||||||
return '^';
|
return '^';
|
||||||
if (key == '-')
|
if (key == '-')
|
||||||
return '_';
|
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;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1302,
|
||||||
/**/
|
/**/
|
||||||
1301,
|
1301,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user