[FEATURE] Add french keybindings
Using workspaces
With the default configuration, the French keyboard doesn't work.
So I've modified the default.conf file to solve this problem. I simply copied the default.conf file to french.conf and made the following changes.
Changes made
- Just change this configuration :
bind = $mainMod, 1, workspace, 1 # Open workspace 1
bind = $mainMod, 2, workspace, 2 # Open workspace 2
bind = $mainMod, 3, workspace, 3 # Open workspace 3
bind = $mainMod, 4, workspace, 4 # Open workspace 4
bind = $mainMod, 5, workspace, 5 # Open workspace 5
bind = $mainMod, 6, workspace, 6 # Open workspace 6
bind = $mainMod, 7, workspace, 7 # Open workspace 7
bind = $mainMod, 8, workspace, 8 # Open workspace 8
bind = $mainMod, 9, workspace, 9 # Open workspace 9
bind = $mainMod, 0, workspace, 10 # Open workspace 10
- Replace by this :
bind = $mainMod, code:10, workspace, 1 # Open workspace 1
bind = $mainMod, code:11, workspace, 2 # Open workspace 2
bind = $mainMod, code:12, workspace, 3 # Open workspace 3
bind = $mainMod, code:13, workspace, 4 # Open workspace 4
bind = $mainMod, code:14, workspace, 5 # Open workspace 5
bind = $mainMod, code:15, workspace, 6 # Open workspace 6
bind = $mainMod, code:16, workspace, 7 # Open workspace 7
bind = $mainMod, code:17, workspace, 8 # Open workspace 8
bind = $mainMod, code:18, workspace, 9 # Open workspace 9
bind = $mainMod, code:19, workspace, 10 # Open workspace 10
I made the same changes for the functions “Move active window to workspace x” and “Move all windows to workspace x”.
Best regards,
@r0d0lphe Do you have a resource in the web that describes that code:10 is the same as pressing 1 and so on?
To clarify the problem - and it applies to ALL WM under Linux - you need to understand the layout of a French keyboard (AZERTY).
- numbers can only be accessed by pressing the SHIFT key and the number,
- If you only press the “1” key, you get the character “&”.
- So, for French keyboards, you need to configure the &é"'(-è_çà keys instead of the ‘1234567890’ keys.
As a result, you can either configure the keys like this:
- bind = $mainMod, ampersand, workspace, 1
- bind = $mainMod, eacute, workspace, 2
- ... Or code them as follows:
- bind = $mainMod, code:10, workspace, 1
- bind = $mainMod, code:11, workspace, 2
- ...
Here are two links explaining the problems of the French keyboard: https://rherault.dev/articles/hyprland-fr-layout and https://www.reddit.com/r/linuxquestions/comments/16sylor/need_help_about_using_hyprland_with_a_azerty/
I hope I've answered your question.
Best regards,
@r0d0lphe Thank you so much for sharing the insights. I have created a dedicated keybinding variation for the french keyboard layout.
https://github.com/mylinuxforwork/dotfiles/blob/main/share/dotfiles/.config/hypr/conf/keybindings/fr.conf
You can copy the file into your .config/hypr/conf/keybindings folder and select it with the ML4W Settings App.
Can you test it and give me feedback? Will be added into the next version and will be activated automatically when the user selects a french keyboard layout during the installation.
I've just tested the modifications. It's correct on the whole, but there's just a key reversal between 6 and 7. This is due to an error on https://rherault.dev/articles/hyprland-fr-layout, sorry.
The keys should be coded as follows:
# Workspaces
bind = $mainMod, ampersand, workspace, 1 # Open workspace 1
bind = $mainMod, eacute, workspace, 2 # Open workspace 2
bind = $mainMod, quotedbl, workspace, 3 # Open workspace 3
bind = $mainMod, apostrophe, workspace, 4 # Open workspace 4
bind = $mainMod, parenleft, workspace, 5 # Open workspace 5
--> bind = $mainMod, minus, workspace, 6 # Open workspace 6
--> bind = $mainMod, egrave, workspace, 7 # Open workspace 7
bind = $mainMod, underscore, workspace, 8 # Open workspace 8
bind = $mainMod, ccedilla, workspace, 9 # Open workspace 9
bind = $mainMod, agrave, workspace, 10 # Open workspace 10
To be reproduced on the “move active windows to workspace x” and “move all windows to workspace x” functions.
Best regards,
@r0d0lphe Thank you so much for testing. Wir change it accordingly.
@r0d0lphe Updated on main branch.