Hi, if you are new to making your own board, and if you are in a country with a different layout than the regular qwerty, you may be tempted to to make some layers to handle punctuations and such, right ? You may be tempted to arrange your firmware mapping to fit the french, german, whatever layout you are used to, right ?
Well, IMO this is a BAD idea
1 What are the problem you will face :
- while designing you firmware, you will have to have two layout in front of you : a qwerty layout, and the one you want to achieve (may it be customized)
- you will have to pin point the aimed character on the qwerty, to translate it as eventually a combination of keys into your layout
- to actually yield the same characters when you press shift, especially punctuation, you will have to replace the shift modifier with a function that turns on a layer, that will hold your "shifted characters and punctuations", but that means that any app that uses the Shift key will pose a problem.
- for some character that you won't find on a qwerty, you will have to know its unicode pattern, and translate it as a macro in your layout, keep in mind that these macro works only on one OS, as each three major OS have their own way to do it, which means that if you want your board to work anywhere, you will have to have three toggle keys mutually exclusive, one for each OS
- you will need the machine you plug your keyboard into, to be set to US english, which might work in an english speaking country, but in your country, chances are it won't be that.
Lots of hassle, lots of conditions, and pretty weird behavior to an uninitiate to your board.
In the firmware, it is highly advisable to stick to a qwerty mapping, eventually take advantage of layers to play with keys that you would not be able to remap otherwise, like for example arrow keys replacing some letters
in a layer. You can also take advantage of other advanced functions, BUT NO ALPHA KEYS (or puctutation) out of its regular place.
Aim for
this in your
firmware :
Aim for
this kind of layout in your
OS :
"Why making a qwerty board ? I am not american, I don't understand"Well, it does not matter, a keyboard does not send characters to your computer, it sends scancodes, and each scancodes is supposed to represent a precise key physical location in a standard US keyboard
2. These scan codes are then translated by your OS into characters according to the language and layout you chose. For example in azerty boards, A and Q are swapped comparing to qwerty, in azerty "A" key emits the scancode 0x10, in qwerty "Q" key emits 0x10.
You see ? keyboards are language independent, just keep that in mind.
Hope it helps new builders, cheers
[
1] : there may be pros, and some specific situations where it wight be desirable, but I yet have to come upon one, if you do, please say so.
[
2] : In fact some boards around the world implements more keys than a standard US, but these additional keys have their own scancodes, and the common keys still emits the very same scancodes.
EDIT (2018-10-06) : after trying to deal with unicode in QMK for a whole day, I can tell with confidence : this is a mess not uniformly handled throughout all three major os, and it does require you to tinker in the said OS, therefore I DEFINITELY stand by my point that it is a WHOLE LOT easier and quicker to make a qwerty firmware, and deal with accents, punctuation and such in a layout inside the OS ! Even in linux