From e08fde007308fffec818b4ad6eccf573f54bed5b Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Sun, 10 Apr 2022 12:37:48 +0100 Subject: [PATCH] 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 #10141) --- src/gui_w32.c | 14 ++++++++++++++ src/version.c | 2 ++ 2 files changed, 16 insertions(+) diff --git a/src/gui_w32.c b/src/gui_w32.c index 584e4ef3e..d1cc06d5b 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -4635,6 +4635,20 @@ _WndProc( } 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. diff --git a/src/version.c b/src/version.c index 5bffc8582..fdb2e4657 100644 --- a/src/version.c +++ b/src/version.c @@ -746,6 +746,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4730, /**/ 4729, /**/