Expand description
Translation from macroquad key codes to shuyi-ui’s hardware-agnostic
Key, collecting a frame’s keyboard events as RawInputEvents, and
hearing what the window’s focus is made from (WindowHeard).
Functions§
- fullscreen_
shortcut - Whether the window’s fullscreen shortcut was pressed this frame:
F11, orAlt+Enter. Like the window’s close button these belong to the platform, not to the game’s keymap (ticket 0902). - ordered
- A frame’s key events in the order they happened, from what the window
says of the frame: the keys
releasedandpressedin it, and whether a key isdownat its end. Releases come first (a key let go, then another pressed), then presses (withshift). A key both pressed and released in one frame was tapped if it is up at the end (pressed, then let go: its release comes after its press), or let go and pressed again if it is down; so a quick tap never reads as a key held down, which would repeat its action until the next release. - poll
- This frame’s key events, in the order they happened (
ordered), then the characters typed (for text boxes, with the keyboard’s layout). - to_key
- The game key for a macroquad key code;
Nonefor keys the game ignores (bare modifiers, which only formShift+chords, and rare keys).