windows: fix an issue processing ctrl+shift for non-alpha keys
This appears to be an unexpected consequence of 6708ea4b36
but thankfully that change allows de-coupling shift processing
from the ctrl processing in this block of code.
refs: #275
This commit is contained in:
1 parent
9e46ac83be
commit
5f0c859caa
2 files changed
+7
-7
No files matched your search
@@ -508,7 +508,7 @@ impl WindowCallbacks for TermWindow {
|
||||
return false;
|
||||
}
|
||||
|
||||
// log::error!("key_event {:?}", key);
|
||||
log::trace!("key_event {:?}", window_key);
|
||||
|
||||
let pane = match self.get_active_pane_or_overlay() {
|
||||
Some(pane) => pane,
|
||||
|
||||
@@ -1091,16 +1091,16 @@ unsafe fn key(hwnd: HWND, msg: UINT, wparam: WPARAM, lparam: LPARAM) -> Option<L
|
||||
modifiers |= Modifiers::SUPER;
|
||||
}
|
||||
|
||||
// If control is pressed, clear the shift state.
|
||||
// That gives us a normalized, unshifted/lowercase version of the
|
||||
// key for processing elsewhere.
|
||||
// If control is pressed, clear that out and remember it in our
|
||||
// own set of modifiers.
|
||||
// We used to also remove shift from this set, but it impacts
|
||||
// handling of eg: ctrl+shift+' (which is equivalent to ctrl+" in a US English
|
||||
// layout.
|
||||
// The shift normalization is now handled by the normalize_shift() method.
|
||||
if modifiers.contains(Modifiers::CTRL) {
|
||||
keys[VK_CONTROL as usize] = 0;
|
||||
keys[VK_LCONTROL as usize] = 0;
|
||||
keys[VK_RCONTROL as usize] = 0;
|
||||
keys[VK_SHIFT as usize] = 0;
|
||||
keys[VK_LSHIFT as usize] = 0;
|
||||
keys[VK_RSHIFT as usize] = 0;
|
||||
}
|
||||
|
||||
let key = if msg == WM_IME_CHAR || msg == WM_CHAR {
|
||||
|
||||
Reference in new issue
Block a user