Patch 9.0.1302
Problem: On a Belgian keyboard CTRL-] does not work.
Solution: Translate CTRL-$ into CTRL-]. (closes #11831)
Files: src/misc2.c, src/gui_x11.c
*** ../vim-9.0.1301/src/misc2.c 2023-01-14 21:07:03.998952303 +0000
--- src/misc2.c 2023-01-18 13:57:20.389467164 +0000
***************
*** 1543,1549 ****
int
may_adjust_key_for_ctrl(int modifiers, int key)
{
! if (!(modifiers & MOD_MASK_CTRL))
return key;
if (ASCII_ISALPHA(key))
--- 1543,1549 ----
int
may_adjust_key_for_ctrl(int modifiers, int key)
{
! if ((modifiers & MOD_MASK_CTRL) == 0)
return key;
if (ASCII_ISALPHA(key))
***************
*** 1559,1564 ****
--- 1559,1571 ----
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;
}
*** ../vim-9.0.1301/src/gui_x11.c 2023-01-22 21:14:32.617863616 +0000
--- src/gui_x11.c 2023-01-23 21:32:22.458112051 +0000
***************
*** 936,946 ****
}
else
{
- len = mb_char2bytes(key, string);
-
// Some keys need adjustment when the Ctrl modifier is used.
key = may_adjust_key_for_ctrl(modifiers, key);
// Remove the SHIFT modifier for keys where it's already included,
// e.g., '(', '!' and '*'.
modifiers = may_remove_shift_modifier(modifiers, key);
--- 936,946 ----
}
else
{
// 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);
*** ../vim-9.0.1301/src/version.c 2023-02-11 13:48:40.338694243 +0000
--- src/version.c 2023-02-11 16:15:08.100787307 +0000
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1302,
/**/
--
Two percent of zero is almost nothing.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20230211161622.4BE0F1C0045%40moolenaar.net.