Skip to content

Commit

Permalink
fix: Add capslock and numlock on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
gabyx committed Jul 24, 2024
1 parent 2196c9a commit 45b4baa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions window/src/os/windows/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2592,9 +2592,11 @@ unsafe fn key(hwnd: HWND, msg: UINT, wparam: WPARAM, lparam: LPARAM) -> Option<L

let mut leds = KeyboardLedStatus::empty();
if keys[VK_CAPITAL as usize] & 1 != 0 {
modifiers |= Modifiers::CAPS_LOCK;
leds |= KeyboardLedStatus::CAPS_LOCK;
}
if keys[VK_NUMLOCK as usize] & 1 != 0 {
modifiers |= Modifiers::NUM_LOCK;
leds |= KeyboardLedStatus::NUM_LOCK;
}

Expand Down

0 comments on commit 45b4baa

Please sign in to comment.