mojira.dev
MC-310794

The display names of certain keys don't use their translation strings

The names of certain keys on the key binds screen don’t use their translation strings (and they never did). This means they can’t be changed in resource packs or other languages.

The affected key binds are as follows:

  • key.keyboard.apostrophe '

  • key.keyboard.backslash \

  • key.keyboard.comma ,

  • key.keyboard.equal =

  • key.keyboard.grave.accent `

  • key.keyboard.left.bracket [

  • key.keyboard.minus -

  • key.keyboard.period .

  • key.keyboard.right.bracket ]

  • key.keyboard.semicolon ;

  • key.keyboard.slash /

This issue happens in 26.2 because the game displays the name from GLFW, rather than using the translation key.

This issue happens in the 26.3 snapshots because SDL_GetKeyName returns a string with a single character, meaning the system used for displaying numbers and letters is used for these keys as well.

Steps to reproduce:

  1. Use a resource pack that changes the text for the above translation keys.

  2. Change a key bind to bind to one of the keys above

  3. Notice how it remains unchanged

    1. (e.g. binding a key to / will display / rather than the value of key.keyboard.slash as set in the resource pack.)

I have provided a sample resource pack below. This resource pack is designed to change the name of all the keys to Key to easily spot any that don’t work.

Attachments

Comments 1

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

[media]

Illusioner2520

(Unassigned)

Confirmed

Platform HC

Low

Text

26.2, 26.3 Snapshot 7

Retrieved