Skip to content

feat(desktop): log the keyboard map on startup - #822

Open
nborodikhin wants to merge 1 commit into
LoveRetro:mainfrom
nborodikhin:feat/log-desktop-keymap
Open

feat(desktop): log the keyboard map on startup#822
nborodikhin wants to merge 1 commit into
LoveRetro:mainfrom
nborodikhin:feat/log-desktop-keymap

Conversation

@nborodikhin

@nborodikhin nborodikhin commented Aug 23, 2026

Copy link
Copy Markdown

Description

On the dev-oriented desktop build keyboard key are mapped to the device buttons, but the mapping is not very clear.

This PR prints out key mapping every time an binary invoked PAD_init() to remind developer of the mapping.

Change

  • platform.c: add logKeyMap(), call it from PLAT_initInput()
  • platform.h: CODE_* constants now use human-readable SDL_SCANCODE_* constants

Testing

  • desktop build: the key map is in the log on startup:
[INFO] Keyboard map:
[INFO]   UP     Up
[INFO]   DOWN   Down
[INFO]   LEFT   Left
[INFO]   RIGHT  Right
[INFO]   SELECT `
[INFO]   START  Return
[INFO]   A      S
[INFO]   B      A
[INFO]   X      W
[INFO]   Y      Q
[INFO]   L1     Tab
[INFO]   R1     B
[INFO]   MENU   Space
[INFO]   POWER  Backspace

Name the desktop scancode constants after their SDL_SCANCODE_* values
instead of raw numbers, and log the button-to-key map from
PLAT_initInput() so a desktop build says which keys it answers to.
@nborodikhin
nborodikhin marked this pull request as ready for review August 23, 2026 20:42
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.

1 participant