From 958d0669e919b7b588d7812e14b24df718ce8d4a Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Wed, 24 Jun 2020 22:10:19 +0200 Subject: [PATCH] Handle modifiers on Release instead of Press events on Windows. Fix #328 --- src/context/windows.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/context/windows.rs b/src/context/windows.rs index ec92b57..07eeffa 100644 --- a/src/context/windows.rs +++ b/src/context/windows.rs @@ -173,8 +173,7 @@ extern "C" fn keypress_callback( } } else if event_type == 1 { // Modifier event - if is_key_down == 1 { - // Keyup event + if is_key_down == 0 { let modifier: Option = match (key_code, variant) { (0x5B, _) => Some(LEFT_META), (0x5C, _) => Some(RIGHT_META),