-
Notifications
You must be signed in to change notification settings - Fork 947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get NumLock status #1426
Comments
In fact this might be a bug because we get both ArrowLeft KeyboardInput event and '4' ReceivedCharacter event when we press the numpad 4 key whereas it should be one or another depending on the numlock status |
I'd like to expand this feature request to resolve khonsulabs/cushy#81. The Each KeyboardEvent implementation tracks numlock and capslock. Here's where they're read in linux: winit/src/platform_impl/linux/common/xkb_state.rs Lines 649 to 651 in cc33212
(and here in windows)
|
@Plecra fill free to extend the event if they are reliably observable on platforms. |
Also wondering the same for Caps Lock and Scroll Lock. It would add a way to fix ruffle-rs/ruffle#13513 (comment) The JavaScript way to do this is with https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState / https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/getModifierState |
Right now, we can detect key press on the numlock key, but is there a way to check the status (on/off) of the numlock ?
The text was updated successfully, but these errors were encountered: