mojira.dev
MC-311584

Key binds bound to Select, Clear and Mode do not work on Linux despite being defined explicitly by SDL

Relates to MC-311578.

The document https://github.com/libsdl-org/SDL/blob/main/src/events/scancodes_linux.h explicitly defines evdev events 353, 355 and 373 as bound to Select, Clear and Mode. However, if any of those key press events actually happen with Minecraft in focus, it will act as though nothing happened at all.

I don’t have a keyboard or other input device that has these, so a script is provided:

  • download the script and put it in a folder, then open a console window in said folder

  • go to the Minecraft key binds menu, then click on something to rebind it

  • to verify the script works, run this and verify it becomes International 3 if you immediately switch to the Minecraft window after pressing Enter: ./simulate-keys 'sleep 2' 'press 124' 'sleep 0.1' 'release 124'

  • now try with this command: ./simulate-keys 'sleep 2' 'press 353' 'sleep 0.1' 'release 353'

  • and this: ./simulate-keys 'sleep 2' 'press 355' 'sleep 0.1' 'release 355'

  • and this: ./simulate-keys 'sleep 2' 'press 373' 'sleep 0.1' 'release 373'

Expected results: we’d see Select, Clear and Mode show up on-screen.

Actual results: Minecraft pretends that no key presses happened at all.

To fix: make Minecraft listen for key press events above 246/above 319, since it doesn’t seem to do that right now.

Attachments

Comments 1

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

[media][media][media][media][media][media][media]

muzikbike

(Unassigned)

Plausible

Platform HC

Low

Input

26.3 Pre-Release 1

Retrieved