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 Dec 7, 2023
1 parent ca17b8b commit 58348f6
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 @@ -2570,9 +2570,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 58348f6

Please sign in to comment.