1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 21:32:13 +03:00

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 2020-10-17 14:00:51 -07:00
parent c32de40978
commit f6afec27f5

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),