Building my way for French Canadian Layout


(François-Olivier Leblanc) #1

Hi everyone!
I just got my keyboard today, I’m really excited! I want to build my perfect layout and share it you here, but I feel it can be a long way…

When I write text (in french), I need characters like: ç à è ù é
While I do get them fairly easily in the french canadian layout on my Mac, I’m clueless as to where to find them on my Model 01.

I scrolled through the keycodes here, but I didn’t find those ‘special’ characters. So I guess my first question is: how can I find and access those?

With the Arduino IDE, we can change the key mapping, but can we create more layers? Say a 4th layer dedicated to programming? (where I wouldn’t need the aforementioned characters but would use brackets more) And can I specify what is the mapping of one character with each modifier?

I know there’s quite a lot of question in this one post. If someone feels like this should be split up, I’m open to that.


(Gergely Nagy) #2

The way these specials work, is that the layout you set on the operating system side will override other symbols with them. To figure out what they replace, set your OS layout to US QWERTY, press the key that normally results in ç, and note down what symbol you get. Do this for the rest. Then switch back to French Canadian, and adjust your keymap to have the replaced symbols at the positions you want the accented symbols at.

Either that, or using the Unicode plugin, or a compose-key and macros would be the way to go. Personally, I use the second, where the RightAlt ' a sequence ends up as á. I suppose something similar can be done for the symbols you need, too.

Yep! You can create up to 32 layers in total. Add the name of the new layer to the layer list, copy one of the existing layers (say, QWERTY), to the end of that array, change its name, and place whatever you want there.

Then you only need to figure out a way to switch to that layer, and adjust the rest of the layers to support that. For example, you can change one of the palm keys to ShiftToLayer(PROGRAMMING) or something along those lines.

You mean like specify what Ctrl+a would map to? No, that’s something the operating system does. All the keyboard can do is report which keys are pressed. What they mean is left for the OS to interpret. There are some hacks around this, but I wouldn’t go there at first. :slight_smile:


(François-Olivier Leblanc) #3

Thank you so much for your detailed response!
I was able to find all (or all I could think of) my special characters. I didn’t think about the fn key…

So much to explore here!

About my last question: no, I meant more like for a given key (example ‘p’), can I choose what option-p does seperately, or is it more like a bundle thing?


(Gergely Nagy) #4

That’s on the OS side. You can change what Fn-p does on the firmware side, but what keys do with the various modifiers, that’s an OS side thing. An the firmware side, the closest thing you can do is override Option-p to send some other combo instead. But it is probably easier to bind it to some other functionality on the OS side…


(Gabriel Morin) #5

Hello there or rather Bonjour, fellow French Canadian!

I have the same needs as you and I found that the fine work by @andrewg solves the problem in a way I can live with for now. Basically he has a fork of the firmware that assigns keys to the keycodes found on most international keyboards, at the cost of moving a few things around. You just need to change the includes in his keymaps.h to choose the options you want.

Personally I elected to only use:
#include “layer-std-qwerty-parameterized.h”
#include "layer-abg-function-inverted-t.h"
and leave the rest as default, so I can try most of the default layout for a while before making even more radical changes like moving modifier keys around.

I found that his placement of extra keys is very good, they’re always in the general area where the key was found previously on a standard French Canadian keyboard, and if he had to move them they are in the closest place that makes sense (LED and Any among others are repurposed in the default layer).

Now what I’m really missing is a card printout that shows the new location of French Canadian symbols with this new layout, but I’m not sure how people make those.

EDIT: Oh, and just in case you run into the same problem, I was unable to install the firmware other than by command line when booting the keyboard in Prog mode, as documented on the wiki and here in the forums.


(François-Olivier Leblanc) #6

Sounds great! I’ll look into it as soon as possible.


(Gabriel Morin) #7

Here is my current keymaps.h if it helps, works well for me. You can ignore my changes to other files in the same commit, those are experiments with the numpad layer and modifier keys.


(Andrew Gallagher) #8

Hi, Gabriel.

I have a tool here (https://github.com/andrewgdotcom/keyboardio-xkb) that I use to programmatically generate layout diagrams based on combining the Model01 custom keymap with various system language settings. Unfortunately it only works on Linux systems and has problems with Unicode that I never managed to debug.

You have to create a new input file for each Model01 keymap and it doesn’t read the same file format that kaleidoscope does. But I have included layout files for each of the main layout options in my firmware fork (under layout-variants).


(Gabriel Morin) #9

Hi Andrew, thanks for your dedicated work on your firmware. The latter really deserves a set of “international” qwerty keycaps for the Model 01 that reflects the places you moved PgUp/PgDn and other important keys.

I occasionally dual-boot into Linux so I will try out your tool, sounds like a real time-saver.


(Gabriel Morin) #10

I’ve tested the merlin2 orphan key placement some more with the French Canadian keyboard and noticed that one of the brackets, “}” I believe, ends up awkwardly on the left side of the keyboard. I guess that’s what gave rise to the merlin3 placement which at least ensure that the [ ] and { } brackets are on the same row as their matching symbol and on a side of the keyboard that matches their orientation. The Spanish keyboard must be very similar to the French Canadian one. That’s a placement completely different from my c#/c++ muscle memory though (I type those brackets very fast with one hand while holding AltGr) so I’m not sure what to think.


(Andrew Gallagher) #11

That’s interesting - what OS are you using? I’ve found a few different Canadian layouts and the brackets seem to be in all sorts of places.


(Gabriel Morin) #12

Windows 7 with French Canadian layout, not to be confused with the Canadian Multilingual layout… Keyboards are a bit of a mess over here.


(Andrew Gallagher) #13

This one here? https://www.google.ie/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwi-zfuH4svZAhXhA8AKHW-pBBgQjxx6BAgAEAI&url=https%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FFile%3AKB_Canadian_French_text.svg&psig=AOvVaw3nJ2Mu-Jbf6N2t3AiNxfwx&ust=1519991450367831

Yes, it does look similar to European Spanish in the brackets layout. The difficulty comes with there being four bracket keys rather than the usual two. It really restricts the options…


(François-Olivier Leblanc) #14

Regarding the conversation of the french keyboard with programmatic capabilites, I decided to take another route. Instead I’ll switch back and forth with the english layout when programming, and back to the french layout when writing text.

I did made some modifications of the FUNCTION layout to better place some keys, like the brackets, the arrows and some modifiers. I’ll take some time soon the draw the layout using Andew’s tool.


(Gabriel Morin) #15

That’s the one. I’m used to touch-type this layout on a standard US qwerty keyboard actually, since I dislike the smaller left shift key and never use the “left of z” key with the typographic quotes.

I guess there are just not enough keys on the right edge of the model 01 to mimic this brackets placement, since the É key is way more important.