Skip to content

[rcore][drm] Fix ESC closing the window despite SetExitKey(KEY_NULL) - #6343

Merged
raysan5 merged 1 commit into
raysan5:masterfrom
maiphi:drm-exit-key-null
Nov 2, 2026
Merged

raysan5 merged 1 commit into
raysan5:masterfrom
maiphi:drm-exit-key-null

Conversation

@maiphi

@maiphi maiphi commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

The stdin keyboard (SUPPORT_SSH_KEYBOARD_RPI) wrote a single ESC byte directly into the state of the exit key. With SetExitKey(KEY_NULL), that is currentKeyState[0], which the exit key check then found set, so ESC still closed the window.

Map a single ESC byte to KEY_ESCAPE like the other keys, and skip the exit key check for KEY_NULL. ESC still closes the window by default, and IsKeyPressed(KEY_ESCAPE) now works with the stdin keyboard too.

Fixes #6342.

The stdin keyboard (SUPPORT_SSH_KEYBOARD_RPI) wrote a single ESC byte
directly into the state of the exit key. With SetExitKey(KEY_NULL),
that is currentKeyState[0], which the exit key check then found set,
so ESC still closed the window.

Map a single ESC byte to KEY_ESCAPE like the other keys, and skip the
exit key check for KEY_NULL. ESC still closes the window by default,
and IsKeyPressed(KEY_ESCAPE) now works with the stdin keyboard too.
@raysan5
raysan5 merged commit 3b12ba1 into raysan5:master Nov 2, 2026
16 checks passed
@raysan5

raysan5 commented Nov 2, 2026

Copy link
Copy Markdown
Owner

@maiphi thanks for the review

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.

[rcore][drm] ESC closes the window despite SetExitKey(KEY_NULL) when the stdin keyboard is used

2 participants