mojira.dev
MC-311010

Most Application Control keys are still displayed as "key.keyboard.[number]" in the key binds menu

Split from MC-310116 to specifically focus on application-related keys, as that ticket now focuses on multimedia control buttons.

26.3 snapshot 7 added a proper translation for the “New” key (which previously displayed as key.keyboard.273) and the “Save” key (which previously displayed as key.keyboard.277). However, many other application control buttons still display raw translation strings when you try to bind a Minecraft in-game action to them, which is wrong and should be corrected.

The affected keys are as follows (first number is the evdev ID, second number is the SDL3 ID, text represents the name assigned by evdev):

130 : 279 (KEY_PROPS)
134 : 274 (KEY_OPEN)
156 : 286 (KEY_BOOKMARKS)
158 : 282 (KEY_BACK)
159 : 283 (KEY_FORWARD)
172 : 281 (KEY_HOMEPAGE)
173 : 285 (KEY_REFRESH)
174 : 276 (KEY_EXIT)
206 : 275 (KEY_CLOSE)
217 : 280 (KEY_SEARCH)

I can reproduce this easily as my Cherry DC 2000 keyboard has a house button, which becomes key.keyboard.281 when I try to bind a control to it. However, not everyone has one of these keyboards, so a Python script is attached to this ticket that can be used to generate key press events for these buttons on Linux (you may need to switch off shortcuts in your operating system’s settings so the game can access the key presses, however).

To reproduce if you have a keyboard with these: just go into Key Binds, click on-screen on the button you want to bind a key to, and then press that key. It spits out a translation string back at you.

To reproduce with the script (Linux only):

  • download the attached script file

  • open a command window in the same folder the script exists in

  • go into the Minecraft key binds menu, then click on one of the buttons

  • go back to the command window then paste this in and run it (replace 130 with one of the numbers in the left column listed above): ./simulate-keys ‘sleep 2' 'press 130' 'sleep 0.1' 'release 130’

  • before the 2 seconds elapse, put the Minecraft window back in focus

Expected results: we would see the names of the keys on-screen: Properties, Open, Bookmarks, Back, …

Actual results: we instead see key.keyboard.279, key.keyboard.274, and so on

Attachments

Comments 1

Thank you for helping us improve Minecraft! We saved your files:

[media][media]

muzikbike

electfall

Plausible

Platform HC

Normal

Input

26.3 Snapshot 8

26.3 Snapshot 9

Retrieved