Skip to content

Fix #2773: space key broken with KEYBOARD_LAYOUT_ES after tic_key_iso_extra removal - #2962

Merged
nesbox merged 1 commit into
nesbox:mainfrom
joshgoebel:fix-2773-es-space-key
Sep 17, 2026
Merged

nesbox merged 1 commit into
nesbox:mainfrom
joshgoebel:fix-2773-es-space-key

Conversation

@joshgoebel

Copy link
Copy Markdown
Collaborator

Closes #2773

Commit 1149e7c (#2768) fixed baremetal space by removing tic_key_iso_extra, shifting tic_key_space to index 48. Non-ES builds were automatically fixed (the trailing ' ' was already at index 48). But KEYBOARD_LAYOUT_ES arrays still had </> at position 48 (the old ISO extra key slot), so ES builds got < for space and > for shift+space. ALT+Space still worked (explaining the workaround described in the issue).

Fix: Remove < from Symbols[48] and > from Shift[48] in the ES layout so tic_key_space (48) correctly maps to ' ' across all layouts. Also trims Alt by one character for consistency and updates the reference comment.

…ey_iso_extra removal

Commit 1149e7c removed tic_key_iso_extra from the enum, shifting
tic_key_space from index 49 to 48. This fixed the non-ES layout
(Symbols[48] was already ' '), but broke KEYBOARD_LAYOUT_ES where
Symbols[48] was '<' (the old ISO extra key), Shift[48] was '>', and
Alt[48] was one past the last useful character.

Remove the '<' and '>' from positions 48 in the ES Symbols and Shift
arrays so that tic_key_space (48) now correctly maps to ' '. Also
update the US KEYS reference comment to no longer show the '<'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@nesbox nesbox left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Verified against the enum rather than the description: tic_key_space is 48 (src/tic.h), and the ES arrays held </> at that index while Alt[48] already held a space — which is exactly why ALT+Space worked in #2773. With this change all three ES arrays map 48 to a space, matching the non-ES layout; ES builds also stop inserting a space on TAB (index 49 was the trailing space in the longer string) and return NUL the way the US layout already does. The root cause in the body checks out (1149e7c, #2768). Thanks — merging.

@nesbox
nesbox merged commit 142b93a into nesbox:main Sep 17, 2026
13 checks passed
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.

Spaces don't work in baremetal builds on pi4

3 participants