Forums

Change console from QWERTY

Hi! In the console, we are forced to use a QWERTY keyboard. Having a AZERTY keyboard, would it be possible to switch from one layout to another? I've tried in terminal the usual linux command:

$ setxkbmap fr 
Cannot open display "default display"

$ loadkeys fr
Couldn't get a file descriptor referring to the console

Tanks a lot in advance! :)

Hmm, that's an interesting question. The console code is a bit convoluted because of the slightly odd way JavaScript handles keycodes, and I'm not sure if we could get that to work. Just out of interest, which browser are you using?

Thanks for your reply! I'm on Firefox 31.0 (Ubuntu 14.04)

Do you have Chrome installed? I think its non-qwerty keyboard handling is better.

Oh yes, you were right, it's working with Chromium! I don't know why it's not the case for Firefox... Thanks a lot ;)

Excellent, thanks for confirming! I think the problem is that the keycodes for JavaScript aren't strictly defined -- for Chrome they send us codes that map to the character that's on the key, and for Firefox they send something more related to where the key is on the keyboard. So for Chrome, when you press your "A" key, we get something we can map to an "A", whereas in Firefox we get something more like "the top left of the keyboard", which we assume is a "Q".

Hopefully it'll be standardised a bit someday -- I'm using a laptop with a Portuguese QWERTY keyboard right now, which is fine when I'm typing letters but goes strange with the punctuation characters -- so I can relate to how irritating it can be...