Mercurial > vim
comparison src/gui_w32.c @ 28574:7c96d7924ea5 v8.2.4811
patch 8.2.4811: Win32 GUI: caps lock doesn't work
Commit: https://github.com/vim/vim/commit/0de7369fd4ed5b739341e9d7971538b89b1748e0
Author: LemonBoy <thatlemon@gmail.com>
Date: Sat Apr 23 11:08:11 2022 +0100
patch 8.2.4811: Win32 GUI: caps lock doesn't work
Problem: Win32 GUI: caps lock doesn't work.
Solution: Handle VK_CAPITAL. (closes https://github.com/vim/vim/issues/10260, closes https://github.com/vim/vim/issues/10258)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 23 Apr 2022 12:15:04 +0200 |
parents | 893251eed714 |
children | 3fd992496509 |
comparison
equal
deleted
inserted
replaced
28573:30f7f66f9a75 | 28574:7c96d7924ea5 |
---|---|
2047 // really care about the presence of Ctrl/Alt as those modifiers are | 2047 // really care about the presence of Ctrl/Alt as those modifiers are |
2048 // handled by Vim separately. | 2048 // handled by Vim separately. |
2049 memset(keyboard_state, 0, 256); | 2049 memset(keyboard_state, 0, 256); |
2050 if (GetKeyState(VK_SHIFT) & 0x8000) | 2050 if (GetKeyState(VK_SHIFT) & 0x8000) |
2051 keyboard_state[VK_SHIFT] = 0x80; | 2051 keyboard_state[VK_SHIFT] = 0x80; |
2052 if (GetKeyState(VK_CAPITAL) & 0x0001) | |
2053 keyboard_state[VK_CAPITAL] = 0x01; | |
2052 if (GetKeyState(VK_RMENU) & 0x8000) | 2054 if (GetKeyState(VK_RMENU) & 0x8000) |
2053 { | 2055 { |
2054 keyboard_state[VK_MENU] = 0x80; | 2056 keyboard_state[VK_MENU] = 0x80; |
2055 keyboard_state[VK_CONTROL] = 0x80; | 2057 keyboard_state[VK_CONTROL] = 0x80; |
2056 } | 2058 } |