Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-121278

Keybindings (p.g. Ctrl+A) are being mapped to the US keyboard layout even if you're using another layout

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w47b, Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w02a, Minecraft 18w07c, Minecraft 18w10d, Minecraft 18w16a, Minecraft 18w21a, Minecraft 18w22a, Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre4, Minecraft 1.13-pre5, Minecraft 1.13-pre6, Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13-pre9, Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w30a, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 18w33a, Minecraft 1.13.1-pre1, Minecraft 1.13.1, Minecraft 1.13.2-pre1, Minecraft 1.13.2-pre2, Minecraft 1.13.2, Minecraft 18w43a, Minecraft 18w43b, Minecraft 18w43c, Minecraft 18w44a, Minecraft 18w46a, Minecraft 18w47a, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w04a, Minecraft 19w04b, Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w07a, Minecraft 19w08a, Minecraft 19w09a, Minecraft 19w11a, Minecraft 19w11b, Minecraft 19w12a, Minecraft 19w12b, Minecraft 19w13a, Minecraft 19w14a, Minecraft 1.14 Pre-Release 1, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, Minecraft 1.14, Minecraft 1.14.1, Minecraft 1.14.2 Pre-Release 1, Minecraft 1.14.2 Pre-Release 2, Minecraft 1.14.2 Pre-Release 3, Minecraft 1.14.2 Pre-Release 4, Minecraft 1.14.2, Minecraft 1.14.3 Pre-Release 1, Minecraft 1.14.3 Pre-Release 2, Minecraft 1.14.3, Minecraft 1.14.4 Pre-Release 1, Minecraft 1.14.4 Pre-Release 3, Minecraft 1.14.4 Pre-Release 4, Minecraft 1.14.4 Pre-Release 5, Minecraft 1.14.4 Pre-Release 6, 1.14.4, 19w34a, 19w35a, 19w36a, 19w37a, 19w38b
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      Accessibility

      Description

      The bug

      If you're using a keyboard layout where the letter A is not on the same position as on a QUERTY keyboard (for example, the French AZERTY layout), Minecraft still maps keybindings as if you were using a US/QUERTY keyboard.

      How to reproduce

      1. Select the French AZERTY keyboard layout (other keyboard layouts are affected as well, see above).
      2. Type something into the chat.
      3. Press Ctrl+A (where A is the key directly to the right of the tab key).
      4. Note that nothing happens.
      5. Press Ctrl+Q (where Q is the key directly to the right of the CAPS LOCK key).
      6. Note that the text you typed into the chat is being selected.

      Other keybindings are affected as well, for example F3+Q and F3+A. This also applies to Mac where for example Command+A is expected to select all text, but quits the app instead.

      Code analysis

      This is caused by the method glfwSetKeyCallback who returns a key code assuming a US keyboard layout.
      To fix it, instead of directly testing the key code returned by glfwSetKeyCallback with the GLFW_KEY constants, it has to be converted to his printable character with the glfwGetKeyName method.

      [Helper] mrpingouin1 in this comment

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fry [Mojang] Georgii Gavrichev
                Reporter:
                Aeldrion Aeldrion
              • Votes:
                70 Vote for this issue
                Watchers:
                38 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: