How to set up AZERTY? #497
Replies: 14 comments 2 replies
-
It depends what operating system you're using and on Windows, which input mechanism you're using (standard vs. interception). On Windows with the standard input mechanism, and assuming your OS keyboard layout is set correctly, you will probably just want to make defsrc look like your physical keyboard's appearance and probably don't need any deflocalkeys configuration. |
Beta Was this translation helpful? Give feedback.
-
For context, @HiiGHoVuTi is on nixos. I assume the evdev module just gives kanata the physical keypresses, which I assume would also mean defsrc should look like the physical keyboard? |
Beta Was this translation helpful? Give feedback.
-
Sure but most characters require special treatment |
Beta Was this translation helpful? Give feedback.
-
My understanding is that the USB codes sent by keyboards map to the QWERTY layout for most keys regardless of the symbols displayed. This should be visible, and should confirm in evtest. So the physical keyboard is kinda lying, but operating systems ask what keys you have (or are preset based on country) to remap in the operating system level. But Kanata will receive the equivalent of usb codes, so pressing the key with the A symbol on the AZERTY keyboard will send Q to Kanata. Confusing 😅 There are a few options. You could map the QWERTY layout in defsrc. Or you could use evtest and define the changed keys with capitals. E.g. (fake numbers, don't use this)
Building on the previous idea, you could map all evtest codes and use all capital letters. It will be more time consuming but more consistent, so probably less error prone and confusing. |
Beta Was this translation helpful? Give feedback.
-
For posterity, evtest should be suggested as a tool for this here: |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@HiiGHoVuTi are you not using the nixos module? I assume that does this for you |
Beta Was this translation helpful? Give feedback.
-
This is all the kanata configuration I have services.kanata = {
enable = true;
keyboards.redox = {
config = builtins.readFile ./keyboard.kbd;
devices = ["/dev/input/by-id/..."];
};
}; |
Beta Was this translation helpful? Give feedback.
-
It does work with qwerty ! |
Beta Was this translation helpful? Give feedback.
-
(deflayer dvorak
@grl 1 2 3 4 5 6 7 8 9 0 [ ] bspc
tab ' , . p y f g c r l / = \
@cap a o e u i d h t n s - ret
lsft ; q j k x b m w v z rsft
lctl lmet lalt spc ralt rmet rctl
) On this layer, when I press |
Beta Was this translation helpful? Give feedback.
-
The OS is doing another layer of remapping still. You could set your keyboard layout in the OS layer to US or US International depending on what you need. Otherwise you'll have to remap with the knowledge of what keycode you need kanata to output for the OS to translate it to the actual desired keysym (e.g. in this case would be q in that position I think) |
Beta Was this translation helpful? Give feedback.
-
So to use kanata (with some keyboards) you have to give all the keyboard control to it and disable your OS's keyboard mappings and set it to US (or US international), right ? |
Beta Was this translation helpful? Give feedback.
-
It's not strictly necessary. Some users use kanata with cyricllic alphabets and there it is required to use OS level remapping. But doing what you describe can make configuration simpler. Internationalisation stuff is complicated haha. |
Beta Was this translation helpful? Give feedback.
-
Now the shift+key (more accurately shift+symbol) behaviour is different from what I would want. Should I define another layer ? I think it may interfere with other programmes. |
Beta Was this translation helpful? Give feedback.
-
I've seen this link on how to use kanata with a QWERTZ iso keyboard, but I still can't quite figure out how to
defsrc
my azerty keyboard correctly. Any help ?Beta Was this translation helpful? Give feedback.
All reactions