Repository navigation
android: add missing support for key modifiers - #403
Merged
Merged
Conversation
2 of 3 tasks
not-fl3
pushed a commit
that referenced
this pull request
May 20, 2026
The translation table only covered letters, digits, arrows, Enter, Tab, Space, Backspace, Shift / Alt, comma + period — which means a hardware keyboard on Android (tablet + Bluetooth / USB / Magic Keyboard; ChromeOS; Stage Manager iPad with a Mac keyboard) couldn't reach the host app with most of its keys. Adds the keys that have a clear semantic and a matching `KeyCode` variant: - Modifiers: Ctrl L/R, Meta L/R (Cmd on Apple keyboards), CapsLock, NumLock, ScrollLock. PR #403 already wired the `KeyMods` tracking for Ctrl / Super, but that's a no-op as long as the keycodes themselves translate to `KeyCode::Unknown`. - Edit cluster: Escape, Insert, Delete (`KEYCODE_FORWARD_DEL`, distinct from the existing `KEYCODE_DEL` → Backspace), MoveHome, MoveEnd, PageUp, PageDown, PrintScreen / Pause. - Punctuation: `=`, `[`, `]`, `\\`, `;`, `/`, backtick. - Menu (KEYCODE_MENU, the soft-menu / context-menu key on tablets). - F1–F12. - Numpad: 0–9 + the four arithmetic ops + dot + Enter + equals. Keeps the existing `KEYCODE_HOME` (0x03) entry that maps the device home button to `KeyCode::Home`; in practice that keycode doesn't reach app input anyway and the new `KEYCODE_MOVE_HOME` (0x7a) maps to the same variant for the cursor-home case. Verified on a Pixel Tablet AVD against `is_key_pressed(Escape)`, `is_key_down(LeftControl)`, and `is_key_pressed(KpEnter)`.
TheRedDeveloper
pushed a commit
to TheRedDeveloper/miniquad-fix
that referenced
this pull request
Aug 12, 2026
The translation table only covered letters, digits, arrows, Enter, Tab, Space, Backspace, Shift / Alt, comma + period — which means a hardware keyboard on Android (tablet + Bluetooth / USB / Magic Keyboard; ChromeOS; Stage Manager iPad with a Mac keyboard) couldn't reach the host app with most of its keys. Adds the keys that have a clear semantic and a matching `KeyCode` variant: - Modifiers: Ctrl L/R, Meta L/R (Cmd on Apple keyboards), CapsLock, NumLock, ScrollLock. PR not-fl3#403 already wired the `KeyMods` tracking for Ctrl / Super, but that's a no-op as long as the keycodes themselves translate to `KeyCode::Unknown`. - Edit cluster: Escape, Insert, Delete (`KEYCODE_FORWARD_DEL`, distinct from the existing `KEYCODE_DEL` → Backspace), MoveHome, MoveEnd, PageUp, PageDown, PrintScreen / Pause. - Punctuation: `=`, `[`, `]`, `\\`, `;`, `/`, backtick. - Menu (KEYCODE_MENU, the soft-menu / context-menu key on tablets). - F1–F12. - Numpad: 0–9 + the four arithmetic ops + dot + Enter + equals. Keeps the existing `KEYCODE_HOME` (0x03) entry that maps the device home button to `KeyCode::Home`; in practice that keycode doesn't reach app input anyway and the new `KEYCODE_MOVE_HOME` (0x7a) maps to the same variant for the cursor-home case. Verified on a Pixel Tablet AVD against `is_key_pressed(Escape)`, `is_key_down(LeftControl)`, and `is_key_pressed(KpEnter)`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.