windows: lowercase the raw key

6c5a996423 was almost great...
the problem is that CTRL-W for example was generating a raw
uppercase W instead of a lowercase W which meant that CTRL-W
for split navigation in vim would trigger the close pane
key assignment.
This commit is contained in:
Wez Furlong committed 2020-10-17 14:02:06 -07:00
1 parent c32de40978
commit f6afec27f5
1 file changed
+1 -1
+1 -1
View File
@@ -1265,7 +1265,7 @@ unsafe fn key(hwnd: HWND, msg: UINT, wparam: WPARAM, lparam: LPARAM) -> Option<L
// 0-9 happen to overlap with ascii
i @ 0x30..=0x39 => Some(KeyCode::Char(i as u8 as char)),
// a-z also overlap with ascii
i @ 0x41..=0x5a => Some(KeyCode::Char(i as u8 as char)),
i @ 0x41..=0x5a => Some(KeyCode::Char((i as u8 as char).to_ascii_lowercase())),
VK_LWIN => Some(KeyCode::LeftWindows),
VK_RWIN => Some(KeyCode::RightWindows),
VK_APPS => Some(KeyCode::Applications),