0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

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)
This commit is contained in:
Yasuhiro Matsumoto
2022-04-10 12:37:48 +01:00
committed by Bram Moolenaar
parent fa76a24109
commit e08fde0073
2 changed files with 16 additions and 0 deletions

View File

@@ -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.