As of the migration to SDL3, the following three keys do not have proper translations if game controls are assigned to them:
Power button (SDL_SCANCODE_POWER) = key.keyboard.102
Sleep button (SDL_SCANCODE_SLEEP) = key.keyboard.258
Wake Up button (SDL_SCANCODE_WAKE) = key.keyboard.259
I have physical keyboards with these keys, and the SDL3 key code list explicitly names them (https://github.com/libsdl-org/SDL/blob/855cbec702f246661ff00a0bce9e0683012840c2/src/events/scancodes_linux.h - see 116, 142 and 143), so having raw code appear when I try to bind these buttons to controls is undesirable behaviour and I’d expect to see actual names when binding game controls to these buttons.
If you have a keyboard with these keys, then reproducing this is as easy as trying to bind these buttons to game controls (after disabling the associated key shortcuts in your operating system settings that cause them to turn your computer on/off).
If you do not have a keyboard with these keys, there is a script-based reproduction method for Linux:
download the Python script attached in the comment section
make sure you’re running in X11, not Wayland, if you specifically want to test the power button
open Minecraft’s key binds menu
open a command window in the same folder you put the python script file
run this command, then switch to Minecraft and select a key to rebind: ./simulate-keys 'sleep 2' 'press 116' 'sleep 0.1' 'release 116'
observe
repeat with this command: ./simulate-keys 'sleep 2' 'press 142' 'sleep 0.1' 'release 142'
and this command: ./simulate-keys 'sleep 2' 'press 143' 'sleep 0.1' 'release 143'
Expected results: these would be displayed in the menu as “Power”, “Sleep” and “Wake”/”Wake Up”.
Actual results: we get raw translation strings displayed, which should not happen.
Thank you for helping us improve Minecraft! We saved your files: