[vim/vim] `<C-[>` still broken for certain Cyrillic keyboard layouts (Issue #14272)

17 views
Skip to first unread message

wildekat

unread,
Mar 22, 2024, 3:27:19 PM3/22/24
to vim/vim, Subscribed

Steps to reproduce

  1. Run gvim -u NONE
  2. Enter Insert mode
  3. Switch to Russian (I'm using the standard/most common ЙЦУКЕН keyboard layout)
  4. Press Ctrl+Cyrillic letter х to attempt to exit Insert mode
  5. Observe how nothing happens

Expected behaviour

Before Vim-8.2.4807, <C-х> was fully equivalent to <C-[> / <Esc>, in any mode ([ and Х are one and the same key).

Version of Vim

9.1.0181

Environment

OS: Windows 10
$TERM: N/A
On Windows, the issue is only present in gVim and does not seem to affect console Vim at all.

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14272@github.com>

Restorer

unread,
Mar 23, 2024, 5:45:24 AM3/23/24
to vim/vim, Subscribed

Please take a look here and here.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14272/2016428567@github.com>

wildekat

unread,
Mar 23, 2024, 7:53:24 AM3/23/24
to vim/vim, Subscribed

@RestorerZ
Thanks, I've been through those threads and a number of other similar ones.

If I were to set set_keycode_trans_strategy to experimental, that would also require setting up hundreds of explicit <C-*> mappings: <C-ц> would have to be mapped to <C-w>, <C-г> to <C-u> and so on. Clearly that's not the way to go.

The problem with set_keycode_trans_strategy == classic is that it does not quite restore the old (pre-8.2.4807) behavior: in this mode, <C-х> basically does not exist, so you cannot even map it meaningfully (but thankfully all the other Ctrl+Cyrillic letter combinations seem to work out of the box).


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14272/2016467628@github.com>

wildekat

unread,
Mar 23, 2024, 10:14:50 AM3/23/24
to vim/vim, Subscribed

Sorry, my bad. It turns out <C-х> does NOT work in Vim-8.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14272/2016506664@github.com>

wildekat

unread,
Mar 23, 2024, 10:14:51 AM3/23/24
to vim/vim, Subscribed

Closed #14272 as completed.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/14272/issue_event/12224502907@github.com>

Anton Sharonov (ant0sha)

unread,
Mar 23, 2024, 10:52:57 AM3/23/24
to vim/vim, Subscribed

Question is, if it is meaningful feature request then...


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14272/2016515795@github.com>

wildekat

unread,
Mar 23, 2024, 11:24:45 AM3/23/24
to vim/vim, Subscribed

I for one would very much like to see this implemented.
One can actually map <C-х> to <C-[> under set_keycode_trans_strategy = experimental, but for that solution to be viable, we would need an equivalent of langmap for Ctrl key bindings.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14272/2016523976@github.com>

Jefri Reynaldi

unread,
Mar 24, 2024, 2:44:40 AM3/24/24
to vim/vim, Subscribed

Steps to reproduce

1. Run `gvim -u NONE`

2. Enter Insert mode

3. Switch to Russian (I'm using the standard/most common [ЙЦУКЕН keyboard layout](https://en.wikipedia.org/wiki/JCUKEN))

4. Press `Ctrl+Cyrillic letter х` to attempt to exit Insert mode

5. Observe how nothing happens

Expected behaviour

Before Vim-8.2.4807, <C-х> was fully equivalent to <C-[> / <Esc>, in any mode ([ and Х are one and the same key).

Version of Vim

9.1.0181

Environment

OS: Windows 10 $TERM: N/A On Windows, the issue is only present in gVim and does not seem to affect console Vim at all.

Logs and stack traces

No response


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14272/2016712558@github.com>

Anton Sharonov (ant0sha)

unread,
Mar 24, 2024, 7:45:45 AM3/24/24
to vim/vim, Subscribed

Thanks to @RestorerZ explanations in PR #14277, right way to
solve this issue seems to be to modify slightly the standard RU
keyboard layout.

Using MSFT "Keyboard Layout Creator" I created custom RU layout
(it is possible to load the existing layout as the starting
point), modified it so that the "small russian ha" (aka VK_OEM_4)
button sends ESC when pressed with CTRL: entered there
U+001b, generated the setup package (named my new layout in
description as "Russian - Custom with ESC on CTRL+HA"), installed
generated setup.exe (requires admin privileges), changed in
system settings which RU layout to use instead of standard one,
reboot - and it works.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14272/2016781989@github.com>

Reply all
Reply to author
Forward
0 new messages