Mercurial > vim
changeset 28411:29b30e2376fe v8.2.4730
patch 8.2.4730: MS-Windows GUI: cannot use CTRL-/
Commit: https://github.com/vim/vim/commit/e08fde007308fffec818b4ad6eccf573f54bed5b
Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Date: Sun Apr 10 12:37:48 2022 +0100
patch 8.2.4730: MS-Windows GUI: cannot use CTRL-/
Problem: MS-Windows GUI: cannot use CTRL-/.
Solution: Handle the WM_KEYUP event. (Yasuhiro Matsumoto, closes https://github.com/vim/vim/issues/10141)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 10 Apr 2022 13:45:03 +0200 |
parents | f4ee0a7c6af2 |
children | 664320e9cdda |
files | src/gui_w32.c src/version.c |
diffstat | 2 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -4635,6 +4635,20 @@ destroy_sizing_tip(void) } break; + case WM_KEYUP: + // handle CTRL-/ + if ((GetKeyState(VK_CONTROL) & 0x8000) != 0 && wParam == 0xBF) + { + char_u string[4]; + + string[0] = CSI; + string[1] = KS_MODIFIER; + string[2] = MOD_MASK_CTRL; + string[3] = 0x2F; + add_to_input_buf(string, 4); + } + return 0L; + case WM_CHAR: // Don't use HANDLE_MSG() for WM_CHAR, it truncates wParam to a single // byte while we want the UTF-16 character value.