Skip to content

Conversation

@CrazyladMT
Copy link
Contributor

@CrazyladMT CrazyladMT commented Dec 24, 2025

Fixes #16515

This PR fixes an issue in the keybindings menu where the reset button shows a cryptic tooltip such as "Reset setting to default (SYSTEM_SCANCODE_##)".

This also adds a new core function for the main menu core.get_key_description() to take a scancode and convert it to the human-readable name that is already available in KeyPress.

To do

This PR is Ready for Review.

How to test

  1. navigate to the keybindings menu inside settings
  2. set a keybinding
  3. hover over the reset button and observe that it shows a human-readable key name
Screenshot From 2025-12-24 10-42-59

Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

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

Does work. At least as long as the key exists.
grafik

According to https://wiki.libsdl.org/SDL3/SDL_Scancode , respectively the USB standard https://gist.github.com/mildsunrise/4e231346e2078f440969cdefb6d4caa3 this should refer to the + key, which does not exist on my keyboard.
Fair enough. Works.

Copy link
Contributor

@y5nw y5nw left a comment

Choose a reason for hiding this comment

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

LGTM

@y5nw
Copy link
Contributor

y5nw commented Dec 25, 2025

Does work. At least as long as the key exists. grafik

According to https://wiki.libsdl.org/SDL3/SDL_Scancode , respectively the USB standard https://gist.github.com/mildsunrise/4e231346e2078f440969cdefb6d4caa3 this should refer to the + key, which does not exist on my keyboard. Fair enough. Works.

This is the key to the left of the backspace key, which is a dead key on some layouts (dead acute on the German layout, dead circumflex on a Swiss one). SDL does not report a keycode for this, so the scancode is displayed.

@y5nw y5nw added >= Two approvals ✅ ✅ Action / change needed Code still needs changes (PR) / more information requested (Issues) and removed One approval ✅ ◻️ labels Dec 25, 2025
@Zughy Zughy removed the Action / change needed Code still needs changes (PR) / more information requested (Issues) label Dec 27, 2025
@y5nw y5nw added the Action / change needed Code still needs changes (PR) / more information requested (Issues) label Dec 27, 2025
@Zughy Zughy removed the Action / change needed Code still needs changes (PR) / more information requested (Issues) label Dec 29, 2025
Copy link
Contributor

@y5nw y5nw left a comment

Choose a reason for hiding this comment

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

Tested and works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tooltip of "reset key" button shows cryptic key ID

4 participants