Skip to content

fix: sync keymod flags with SDL3 (add LEVEL5, rename RESERVED to SCROLL)#417

Merged
revmischa merged 2 commits into
vhspace:masterfrom
serpilliere:fix_mod_state
Jul 21, 2026
Merged

fix: sync keymod flags with SDL3 (add LEVEL5, rename RESERVED to SCROLL)#417
revmischa merged 2 commits into
vhspace:masterfrom
serpilliere:fix_mod_state

Conversation

@serpilliere

Copy link
Copy Markdown
Contributor

Some keymod where missing from the sdl3 doc.
This result in the following result: if the user hit Scroll lock and call keyboard.mod_state(), the:

        unsafe { Mod::from_bits(sys::keyboard::SDL_GetModState().0).unwrap() }

results in a panic.

This sync the code with the sdl3 doc at https://wiki.libsdl.org/SDL3/SDL_Keymod

@revmischa revmischa changed the title Sync keymod with sdl3 doc fix: sync keymod flags with SDL3 (add LEVEL5, rename RESERVED to SCROLL) Jul 21, 2026

@revmischa revmischa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct against the SDL3 keymod docs. Thanks!

@revmischa
revmischa merged commit 9ab9d24 into vhspace:master Jul 21, 2026
63 checks passed
@serpilliere
serpilliere deleted the fix_mod_state branch July 24, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants