From f6afec27f558bc99ae4903366f4a36292ba2373f Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 17 Oct 2020 14:00:51 -0700 Subject: [PATCH] windows: lowercase the raw key 6c5a99642392eda5d7b5a7ee7cc0f150346bc7e7 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. --- window/src/os/windows/window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/window/src/os/windows/window.rs b/window/src/os/windows/window.rs index e709eedb0..d9b229c9e 100644 --- a/window/src/os/windows/window.rs +++ b/window/src/os/windows/window.rs @@ -1265,7 +1265,7 @@ unsafe fn key(hwnd: HWND, msg: UINT, wparam: WPARAM, lparam: LPARAM) -> Option 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),