Skip to content

Commit

Permalink
mac: fix for doubled key events (fix #2505)
Browse files Browse the repository at this point in the history
  • Loading branch information
elfmz committed Nov 17, 2024
1 parent 86a84c0 commit 2f38afe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions WinPort/src/Backend/WX/wxMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1563,9 +1563,8 @@ void WinPortPanel::OnKeyUp( wxKeyEvent& event )
(!_key_tracker.Alt() || _key_tracker.Shift() || _key_tracker.LeftControl() || _key_tracker.RightControl()
|| !isNumpadNumericKey(event.GetKeyCode()) || g_wayland) && // workaround for #2294, 2464
#endif

_key_tracker.CheckForSuddenModifiersUp()) {
_exclusive_hotkeys.Reset();
_key_tracker.CheckForSuddenModifiersUp()) {
_exclusive_hotkeys.Reset();
}
//event.Skip();
}
Expand Down Expand Up @@ -1633,11 +1632,12 @@ void WinPortPanel::OnChar( wxKeyEvent& event )
ir.Event.KeyEvent.bKeyDown = FALSE;
wxConsoleInputShim::Enqueue(&ir, 1);

#if !defined(__WXOSX__)
// avoid double up event in ResetInputState()
wxKeyEvent keyEventCopy = _key_tracker.LastKeydown();
_key_tracker.OnKeyUp(keyEventCopy);

_enqueued_in_onchar = true;
#endif
}
//event.Skip();
}
Expand Down

0 comments on commit 2f38afe

Please sign in to comment.