mojira.dev
MC-121278

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

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.

– @unknown in this comment

Related issues

MC-93926 bug whit AZERTY mac keyboard in command blocks MC-121643 Impossible to use Ctrl+A in input boxes MC-121646 AZERTY is QWERTY in the chat box and for debug shotcuts. MC-121835 We can't select all text using Ctrl+A in chat, anvils & world creation screen MC-121958 F3+'KEY' and AZERTY keyboard MC-122031 Problem with AZERTY keyboard MC-122436 Pressing F3+Q to display help reloads all chunks instead on AZERTY keyboard MC-123250 Debug options F3+A and F3+Q inverted MC-123387 CTRL + A doesn't work MC-124149 Wrong assimilation of key bindings MC-126556 ctrl + a doesn't work with azerty keyboards MC-127713 Control + A not working MC-128098 Keyboard shortcuts do not support AZERTY keyboards MC-128630 The game changes from AZERTY to QWERTY MC-130116 French shortened bugged MC-130128 Crlt + a in chat don't work MC-130131 Crlt + a in chat don't work MC-131517 We do not have the "CTRL+A" ?? ( see the edit ) MC-133240 CTRL + A does not work MC-133955 Copy / Paste don't work on 1.13 MC-133958 F3+Q doesn't show help text but reloads chuncks MC-133977 F3+key not working with non english keyboard MC-134001 Shortcuts don't take into account alternate keyboard layouts MC-135120 The shortcut Ctrl+A doesn't work in text fields MC-135526 Ctrl bug MC-136133 Ctrl + A and Ctrl + C MC-136655 CTRL+A is not working on AZERTY keyboards and variants MC-137882 "F3 + A" and "F3 + Q" are reversed MC-138511 AZERTY inputs work as QWERTY MC-144393 Debug key bindings use QWERTY with non-QWERTY keyboards MC-146501 Select all text (ctrl+a) don't work as it should be MC-146504 [Mac OS]Cmd + a to select all text doesn't work MC-148569 F3 + A and F3 + G are invert in azerty keyboard MC-152508 All key combinations uses raw KeyCode instead of the actual key pressed MC-163007 The "select all" keyboard shortcut (ctrl + a) doesn't work on AZERTY layout MC-186883 "F3 + Q" et "F3 + A" sont inversé MC-200113 Debug Menu doesn't change when using different keyboard to QWERTY MC-210667 F3+Q shows keys for qwerty MC-210668 copy and paste commands are wrong (on purpose but should fix) MC-230640 key error MC-233086 'Select all' keybinding forced to QWERTY keyboards only MC-238741 F3 commands in chat MC-296429 Keyboard layout not respected for ctrl+key shortcuts

Comments

Misode

Works for me (Windows 10, idk if it matters)
Make sure the text field is actually selected.

migrated

It matters.

mrpingouin1

Just to be sure, do you rather mean CTRL+A in the title?
Otherwise I can also confirm that using CTRL+A to select text isn't working, and I have to use CTRL+Q instead.
The F3+A and F3+Q shorcuts are also affected and thefore swapped out.

It seems to be caused by the use of an azerty keyboard in my case

bemoty

Using CTRL+A to select the text works for me. - Windows 10

mrpingouin1

Confirmed even more by digging a bit :
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.

mlakuss

Still present in 18w01a

migrated

Still present in 18w07c

Meylody

Still present in 18w10d

migrated

Confirm for 18w16a

migrated

Confirm for 18w22a

migrated

Confirm for 1.13-pre1
It's very very worrying for the French players considering the imminent arrival of the 1.13... :/

Plancke

Confirmed present in 1.13-pre2

migrated

Still in 1.13-pre4

ZeNico13

Still present in 1.13-pre5

migrated

Still in 1.13-pre6

ZeNico13

Still in 1.13-pre7

ZeNico13

Still in 1.13-pre9... :flag_on:

migrated

Still in 1.13-pre10 😞

ZeNico13

Is the assigned manager really fixing the bug? Because, this is a very painful bug for anyone with an AZERTY keyboard...
Especially that the 1.13 must release tomorrow! It is crazy that nobody takes seriously this bug!

Could we just have news as for the correction of the latter please? Thanks 🙂

Hugman_76

This also affects the port of the control settings from 1.12.2 to 1.13-pre10

migrated

Still in 1.13 Release guys ....

 

migrated

Broken keybindings in the official release. Ouch.

migrated

I know right, especially knowing that bug was reported early

migrated

@Bertrand @Valentin @Jonathan

In my opinion, having this bug still around is still better than fixing it BUT not fixing at the same time MC-127862. For a short explanation of the issue : "Alt Gr" can cause "Ctrl" to be virtually locked. Meaning that when it's the case, typing the letter "A" (quite common letter) would delete everything (which already happens on QWERTY / QWERTZ keyboards that also have an Alt Gr key, such as german ones).

Of course, that bug isn't problematic only with "A" key, but it would make it worse.

ZeNico13

@Azkunki Okay, but why did it work very well before and without problems? Plus, there, we are talking about keyboard shortcuts that are often used in game!

migrated

@ZeNico

I said "having this bug still around is still better than fixing it BUT not fixing at the same time MC-127862". That means "the best would be to fix them BOTH as soon as possible", not "it's better to not fix these bugs at all".

 

"Plus, there, we are talking about keyboard shortcuts that are often used in game!"

Except that it does not have irreversible consequences, it's annoying at most. Whereas MC-127862 is a bug that is far worse since there you can lose everything you were writing (something you might not remember well, and the bug stays active as long as you don't happen to press "Ctrl". And in top of that, only the left one works if I'm not mistaken. So if you don't know how to stop the bug, you're in for a lot of trouble, maybe up to restarting your game. Because EVERY time you will use arrow or deletion keys, it will act for the whole word). And if you fix the bug with shortcuts combinations using A (or Q / Z / W / M), as I already said, it will just make MC-127862 much worse. Because then, every single time you will type an "A" while the bug is active will instantaneously delete everything you were writing (I mean, this time you won't even have the time to realize you should stop pressing backspace (most likely) and maybe save some text from deletion, and it will occur insanely often since the letter "A" is a pretty common one. Maybe even more (a little more) in French than in English ("on vA pAs se mentir, cette combinAison de bugs est pArticulièrement chiAnte").

In other word, to never be affected by this bug even when it's active, you would manage to always write exactly what you wanted to write (so never in need to modify anything) while doing a lipogram in "A"... Good luck :/ (a lipogram in "Q" is much, much, much easier, you can't disagree on that)

 

NB : A "lipogram" is a text in which you purposely omit one of several letters. Doing so with the letter "E" of course is the hardest, but it's still quite a challenge as well with the letter "A". While the letter "Q" is quite pretty easy to avoid.

migrated

Still in 18w30a

ZeNico13

Still in 18w30b

ZeNico13

Still in 18w31a

migrated

Still in 18w32a...**

FIX PLEASE !!!!!!!!

ZeNico13

Still in 18w33a...

ZeNico13

Still in 1.13.1-pre1

ReadyFoxy

Still in 1.13.1 RELEASE

FIX PLEASE

ZeNico13

Still in 1.13.2-pre1...

Fix it please ! :'(

ZeNico13

Still in 1.13.2-pre2

ReadyFoxy

Still in 18w43a 😞

ZeNico13

Still in 18w43b

ReadyFoxy

Still in18w44a :angry:

ReadyFoxy

Still in 18w46a
Another developer can do it?

ReadyFoxy

Still in 18w47a

ReadyFoxy

Still in 18w50a

ReadyFoxy

Still in 19w04a

ZeNico13

Still in 19w05a...

migrated

Still in 19w06A

ZeNico13

Yeah... Is the assigned manager can fix the bug please? Because, this is a very painful bug for anyone with an AZERTY keyboard...

ReadyFoxy

Still in 19w07a 😞

ReadyFoxy

Still in 19w08a

ZeNico13

Still in 19w08a

ReadyFoxy

Still in 19w09a

ReadyFoxy

Still in 19w11a

ZeNico13

Still in 19w11b

ReadyFoxy

Still in 19w12a

ZeNico13

Still in 19w12b

ZeNico13

Still in 19w13a

migrated

This is the third most voted bug and has been reported over two years ago and is still not fixed. It is really annoying. It seems that voting for a bug to be fixed doesn't matter at all in prioritizing the work ?

 

For other players: a decent workaround is to put your cursor at the end which is the case when you rename something in the anvil. Then press Shift+Begin (the arrow above end key), it will behave as a ctrl+a for a single line of text. Still better than nothing.

migrated

@val59000mc you can also use crtl+q instead, it works exactly like crtl+a should work

migrated

@stebo02 @Steb B
You might understand his opinion as for a game that is 10y old, and own by Microsoft, a simple ctrl+a should work, as we are used to do it on our azerty keyboard, ofc he knows that he can ctrl+q as he doesn't have any other choice so far ^^'

migrated

@Stef B

Except that if you start doing that in Minecraft, you'll get used to doing that out of Minecraft as well :/ Which then makes it annoying anywhere, not only in Minecraft. And to make it even worse, Ctrl+Q is a shortcut that can sometimes act like Alt+F4 (and you won't always get a warning saying you have unsaved changes. For instance, if I do it like that, when writing in my browser, it won't always warn me about anything, depending on what site I'm writing (although it doesn't seem to work anywhere anyway right now, for me. Which is weird, especially that I'm pretty sure it should have worked on Firefox and windows explorer (also tried on Notepad++, but I may have unbound that there, which could be an explanation). Maybe I've got some bug that makes that useless yet potentially annoying shortcut not work anymore for me ?)

 

 

@val59000mc

It's not at all the third most voted bug (it's the 287th), and it has been reported around 1.5 year ago. Which doesn't change that it's surprising such a bug is still around after so long of course, it's like they don't care (which is why I'm not active anymore here, and as well why I have much higher hopes in "you-know-what-game-I'm-talking-about" (or maybe not, but I obviously can't say here clearly what I'm talking about). At least it's quite promising on every aspect so far (and with some luck, maybe it will make Mojang wake up)).

violine1101

This is a bug tracker, not a forum. This bug will be fixed when it is fixed, complaining here won't change that. Please comment here only if you have something new to add to the ticket. Off-topic comments will be removed.

If you need to discuss this issue anyway, feel free to open a thread on /r/Mojira.

migrated

 Still in 19w14a

ZeNico13

Still in 19w14a

ReadyFoxy

Still in 1.14 Pre-Release 1

ZeNico13

Can confirm in 1.14 Pre-Release 1

migrated

Still in 1.14 Pre-Release 2

ReadyFoxy

Still in 1.14 Pre-Release 4.
1.14 will be released on Tuesday and this bug is still not fixed since snapshot 1.13 !
When will you solve it? It's really annoying for azerty keyboard users and even more so if we also play with versions below 1.13, we have to constantly think if we need to do Ctrl + A or Ctrl + Q

ReadyFoxy

Still in 1.14 Pre-Release 5 😞

migrated

I also have this issue. It didn't exist in previous versions. I think before 1.13

 

Copy and Paste are the most problematic ones.

 

OS: Kubuntu 18.04 (64 bit)

 

ReadyFoxy

Still in the release (1.14) WTF

migrated

Please fix this ... (still in 1.14)

ZeNico13

Still in 1.14.1 Release

ReadyFoxy

Still in 1.14.2 Pre-Release 1

ZeNico13

Still in 1.14.2 Pre-Release 2

Johnibur

If you ever fix this bug, please add customization support. Actually some of these keys are bend to specific letters for their easy access in US keyboard, not for their significance. One example is F3 + N which is switching gamemode, very useful for ops or on a creative map. With this key combination, you can currently reach both keys with one hand on any keyboard layout. If this bug is fixed, I won't be able to use this key without loosing my mouse control anymore, as F3 and N are very far away from each others on my layouts and will require to use both hands.

ReadyFoxy

Still in 1.14.2 Release

migrated

Still in 1.14.3 Pre-Release 1 & 1.14.3 Pre-Release 2

ReadyFoxy

Still in 1.14.3 Release

ReadyFoxy

Still in 1.14.4 Release

ReadyFoxy

Still in snapshot 19w35a

ReadyFoxy

Still in 19w36a

migrated

I can only agree with @ZeNico13 (and, I mean, it's the bug update. If it's not a priority now, when will it be ?). However, and although it does not concern me anymore thanks to my new computer (but for the sake of those that are still affected), I'd like to remind you that there's also MC-127862, which will become worse if and when MC-121278 will be fixed (if it's the only one of the pair to be fixed).

 

In short, it would become worse because it would mean that Ctrl+A wouldn't require to actually (physically) do Ctrl+Q on the keyboard, hence with MC-127862, when writing something, it would become far, far more common to lose everything, since "A" is obviously much more common than "Q" (MC-12762 is basically the Ctrl key being virtually locked, so keyboard shortcuts can interfere, in a variety of ways, while doing something else).

migrated

Same. It's been affecting me for so long and I still trip over it all the time. This really needs to be fixed, it's a source of chronic frustration for the entire french playerbase.

migrated

You know you can change the Minecraft controls? I set my drop key from q to ` as I kept dropping  my items when walking.

migrated

@anonymous : No. We're talking about a keyboard shortcut that can more or less work anywhere, not only on Minecraft. And for this reason, even if it was possible to change the keyboard shortcut, it would be a bad idea since you would get used to your custom shortcut on Minecraft and keep doing it outside of Minecraft as well, where it would still be Ctrl+A. If would ever get used to your custom shortcut on Minecraft (which wouldn't prevent using the wrong shortcut more or less often, even out of Minecraft, most likely).

Also, even if it was possible to change the shortcut AND that it was a thing only on Minecraft, it could still be an issue, since as you said yourself, not every key fits the way you play.

migrated

What are you doing Mojang ? It's frustrating to have some changed shortcuts (on azerty keyboard we need to use qwerty shortcut wtf ??) on a single game and this from several large versions ... Please fix this, this is really important ...

Johnibur

I think it's more complex than just fixing the key code. For instance, a usefull shortcut for server admins is the ability to change game mode with F3 + N. On qwerty keyboard, you can hit the 2 keys with one hand. On another keyboad (bépo), you need 2 hands. This means a simple fix could break the current accessibility being offered. So a proper fix means we would need a way of customizing those controls.

migrated

Still in 20w08a

Voxolotl

Still in 20w18a... 

migrated

This is still a thing, over 3 years later, and apparently, has been resolved by LWJGL (cf: https://bugs.mojang.com/browse/MC-121278?focusedCommentId=706194&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-706194)

all that's needed now is for someone to notice this, change a couple lines of code, and that's it

 

wobst.michael

Can some please check if this is fixed in 22w16b as this snapshot comes with the latest LWJGL version.

ZeNico13

@@unknown I checked in 22w16b and unfortunatly, the bug is still present.

migrated

Can confirm in 1.19.3.

Brain81505

Can confirm in 1.19.4

Lunarian

Can confirm: 23w12a

migrated

Can confirm in 1.20-pre1 under Linux using a french BÉPO keyword

Lunarian

Can confirm in 23w44a.

migrated

Confirmed in 24w12a

BugTracker

Can confirm in 24w14a.

migrated

Can confirm in 1.20.5-rc2.

Lunarian

Can confirm in 1.20.6 and 24w20a

migrated

(Unassigned)

Confirmed

Platform

Normal

Accessibility

accessibility, azerty, keybinding, keyboard, layout, lwjgl, qwerty

Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w47b, Minecraft 17w50a, ..., 1.20.4, 24w13a, 1.20.5 Release Candidate 2, 1.20.6, 1.21

Retrieved