Skip to content

Commit

Permalink
Merge pull request #101763 from SupSuper/patch-1
Browse files Browse the repository at this point in the history
[Windows] Fix left/right Shift key regression
  • Loading branch information
Repiteo committed Jan 21, 2025
2 parents 3e91b9d + 17423e9 commit 8cf94c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion platform/windows/display_server_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4690,7 +4690,9 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
// If multiple Shifts are held down at the same time,
// Windows natively only sends a KEYUP for the last one to be released.
if (raw->data.keyboard.Flags & RI_KEY_BREAK) {
if (!mods.has_flag(WinKeyModifierMask::SHIFT)) {
// Make sure to check the latest key state since
// we're in the middle of the message queue.
if (GetAsyncKeyState(VK_SHIFT) < 0) {
// A Shift is released, but another Shift is still held
ERR_BREAK(key_event_pos >= KEY_EVENT_BUFFER_SIZE);

Expand Down

0 comments on commit 8cf94c8

Please sign in to comment.