French Canadian keyboard 'cf' reconfiguration problem

Moderator: BarryK

Post Reply
bluefrog
Posts: 14
Joined: Sat Jan 14, 2023 12:31 am
Has thanked: 2 times
Been thanked: 5 times

French Canadian keyboard 'cf' reconfiguration problem

Post by bluefrog »

Hi everybody,
After successfully installed and tried for a few days Easy 4.5.5, with:
Country Settings: fr_CA (UTF-8) Keyboard: cf (having PC 102 keys int'l keyboard with Quebec symbol configuration on it)
I found myself suddenly unable to get some keys (like bracketleft and bracketright, normaly key AD11 and AD12 on 'cf' config).
Thinking that I may have inadvertently change my keyboard by pressing 'ok' instead of closing the keyboard config box,

I tried every configuration possible in:
Pup Control -> Parameters -> ~Basic configuration (2nd icon) and ~Country config (3rd icon) and
Pup Control -> Material -> ~Input peripherals (3rd icon)

I selected 'cf' as country for my keyboard (and also 'fr'),
and tried 101, 104, 105 keys generic keyboard.
In ~'Xkb keymap configuration' dialog box I tried 'ca'-Canada, 'qc'-Quebec and 'fr'-France.
And also tried all keyboard variations for 'ca' which are:
fr-dvorak / fr-legacy / multix / multi / multi-2gr [and not of course Inuktitut :-) ]
without success.-

-> At one point I looked at the file /etc/keymap -> which contained: cf (seeming normal)
-> I also experimented with a perfectly running Easy 4.5.2 version. I changed the keyboard config and then, tried to get back to the original install made by the system at first installation and got the same problem as on version 4.5.5.

Finally, after many hours of guessing and trying to find the right config files, I found at the beginning of /etc/X11/symbols/ca:

Code: Select all

xkb_symbols "fr" {
  name[Group1] = "French (Canada)";

has the right AD11 (bracketleft), AD12 (bracketright), AC11, BKSL keys...

And I found that the file /etc/X11/symbols/qc:

Code: Select all

xkb_symbols "fr" {
  name[Group1] = "Quebec";

has exactly the same keymap as the file 'ca' for the symbol "fr" (a repeat of the same information).
Note that 'qc' is may be a vestige of the past.

The interesting thing is that the symbol "fr" (and the associated keys which are the right ones) is not available in the keyboard variations dialog box (presenting only: fr-dvorak / fr-legacy / multix / multi / multi-2gr/inuktitu/english)
May be the solution is there.

Which would explained why, trying to repeat the problem in version 4.5.2, I think I saw in the original 'Country configuration' dialog box:
1) fr_CA French,Canada 2) Canada/Eastern (as tz) 3) fr (France)

That's the combination that works but that I'm unable to replicate.

Re-calling Bologne Che, never encountered this problem ?

bf

Caramel
Posts: 490
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 102 times
Been thanked: 84 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by Caramel »

Une chose à essayer : faire une copie de ca en cf (dans /etc/X11/kbd/symbols/) et sélectionner cf dans QuickSetup

Je n'ai pas une grande expérience de Linux. Mais j'essaie d'aider, alors pardonnez-moi si je dis une bêtise.

bluefrog
Posts: 14
Joined: Sat Jan 14, 2023 12:31 am
Has thanked: 2 times
Been thanked: 5 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by bluefrog »

Merci Caramel d'écarter mes oeillères.
Thanks Caramel to open my blinkers (literal translation)

I was entirely focused to find the appropriate file to add the qc|fr keymap in the keyboard variations dialog box,
and to bring attention on a permanent solution before the future release of the kirkstone series.
I completely overlooked the possibility of a simple hack to solve my problem.

Surfing on your idea, I replaced in the file /etc/X11/xkb/symbols/ca :

Code: Select all

xkb_symbols "fr-dvorak" {
  name[Group1] = "French (Canada, Dvorak)";

by

Code: Select all

xkb_symbols "fr-dvorak-old" {
  name[Group1] = "French (Canada, Dvorak)";

and replace the first keymap:

Code: Select all

xkb_symbols "fr" {
  name[Group1] = "French (Canada)";

by

Code: Select all

xkb_symbols "fr-dvorak" {
  include "ca(fr)"
  name[Group1] = "French (Canada)";

and reconfigure my keyboard but ... without success. Must find something else.

User avatar
BologneChe
Posts: 510
Joined: Sun Aug 23, 2020 12:29 am
Location: Stoneham, Québec
Has thanked: 318 times
Been thanked: 140 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by BologneChe »

@bluefrog

Mes paramètres pour le clavier :

- fr_CA (UFT8)
- variante : Multix
- 105 keys
- c'est un clavier de portable (Acer Spin 1)

Pour obtenir les "brackets", je dois appuyer sur ALT CAR puit sur la touche appropriée. J'ai peu de problème au niveau du clavier sauf lorsque j'utilise Chromium (sous d'autres variantes de Puppy)

Voilà!

Born to lose; live to win

Caramel
Posts: 490
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 102 times
Been thanked: 84 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by Caramel »

bluefrog wrote: Thu Feb 02, 2023 5:19 am

The interesting thing is that the symbol "fr" (and the associated keys which are the right ones) is not available in the keyboard variations dialog box (presenting only: fr-dvorak / fr-legacy / multix / multi / multi-2gr/inuktitu/english)

Dans /etc/X11/xorg.conf.d/10-evdev-puppy.conf, il y a une section ligne 18 pour le clavier avec une option XkbVariant

Caramel
Posts: 490
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 102 times
Been thanked: 84 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by Caramel »

J'ai testé l'installation d'Easy 4.5.2 avec un clavier French-Canadian

Au premier lancement au choix du clavier en mode texte j'ai pris le nombre 8 pour cf.
Dans QuickSetup, j'ai choisi cf. Dans le choix des variantes (après le choix de la disposition ca) il y avait les mêmes options pour les variantes que pour 4.5.5 et en particulier pas de fr.
Je n'ai pas validé de choix pour la variante.

Section clavier dans 10-edev-puppy.conf correspondante

Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbRules" "xorg"
Option "XkbModel" "pc102" #xkbmodel0
Option "XkbLayout" "ca" #xkeymap0
Option "XkbVariant" "" #xkbvariant0
EndSection

Le clavier était en qwerty et la touche AD11 était conforme avec ^ et [

Conclusion : je pense qu'au démarrage il ne faut pas choisir de variantes et rester sur la disposition par défaut

Et pour rectifier sans réinstaller on doit changer le clavier de cf en us (par exemple). On revient ensuite à cf sans entrer de variante.
Un redémarrage peut être nécessaire.

Au vu de mon premier message la conclusion est un peu prétentieuse mais cette fois j'ai testé.

Caramel
Posts: 490
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 102 times
Been thanked: 84 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by Caramel »

Autre approche basée sur
https://karols.github.io/blog/2013/11/1 ... for-linux/

Dans ca (/etc/X11/xkb/symbols) , la section par défaut "fr" a été recopiée plus bas juste avant //EXTRAS

Le début de la nouvelle section

default partial
xkb_symbols "fr" {
name[Group1] = "French (Canada)";

a été remplacé par

partial
xkb_symbols "french" {
name[Group1] = "French (Canada)";

Dans /etc/X11/ xkb/rules/edev.xml,
le morceau

<variant>
<configItem>
<name>french</name>
<description>French(Canada)</description>
</configItem>
</variant>

a été ajouté.

Comme ça ne fonctionnait pas,
la ligne

french ca: French(Canada)

a été ajoutée dans la partie "! variant" aux fichiers edev.lst et base.lst de /etc/X11/xkb/rules

Ouf! Le variant french (qui est en fait le variant par défaut rebaptisé) apparait dans la liste

J'ai fait un pet avec les modifications.

xkbvariant-french-canada-0.1.pet
(45.46 KiB) Downloaded 54 times

Après installation et choix du variant, il faut redémarrer (cliquer sur le bouton OUI ne suffit pas)

A fonctionné pour moi

bluefrog
Posts: 14
Joined: Sat Jan 14, 2023 12:31 am
Has thanked: 2 times
Been thanked: 5 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by bluefrog »

Wow! Je suis sidéré. Merci énormément, Caramel, pour le travail.
Wow! I'm flabbergasted. Big thanks, Caramel, for all the work.

I should have look back at the forum, and see your a little bit sooner.
I just spent most of the day trying your idea of 6h08 am and navigating between the bin, share, etc, local, config files trying to make sense of the init path.
At the end, I was almost ready to pitch the sponge (literal translation meaning I was defeated) :-)

Now, I'm very near upbeat. I'm happy to look and test forward your product. :-) :-) :-)
Thanks again.

bf

bluefrog
Posts: 14
Joined: Sat Jan 14, 2023 12:31 am
Has thanked: 2 times
Been thanked: 5 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by bluefrog »

Well...thanks again Caramel for the time to research and built it but, in my case, the pet doesn't work.
Even if the keymap of my keyboard is the standard in Quebec; used in public service and all big organisation
(for example: it is the keymap used by Hewlett-Packarfd and Logitech for their french-canadian keyboard). With:
- brackets on the keys following 'o' and 'p' (using Alt)
- braces on the keys following 'k', 'l', ';' (using Alt)

Anyway, I found a second problem on Easy 4.5.2 and 4.5.5
Even if I don't touch the good working 'cf' keymap of the initial setup at installation,
which give perfect result for:
- terminal, geany and other apps in the main desktopk
- terminal in container
It doesn't work for the terminal or apps working inside dunfell container,
which present another fr-ca keymap but not the standard one.

I remember know, that it was not inadvertently that I tried to modified the setup. It was to try to solve this problem.

To BK: you made a comment in one of your file following a post by Feodor awhile ago bringing attention
to the german keyboard also not working inside a container. Problem that I think you solved. :-)

bf

esmourguit
Posts: 25
Joined: Mon Oct 12, 2020 9:42 am
Been thanked: 4 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by esmourguit »

Bonjour,
Sans garantie, pour activer le clavier canadien français qc, avez-vous essayer cette manipulation?
Rendez-vous dans le menu Configuration ou Assistant de configuration,
Choisissez Assistant souris/clavier.
Une fenêtre s'ouvre : Cliquez sur Configuration avancée du clavier Xorg,
Validez la première fenêtre puis cliquez sur Dispositions. Dans la liste qui s'affiche vous trouverez le clavier qc. Mettez-le en surbrillance et validez.
Cordialement,

User avatar
BologneChe
Posts: 510
Joined: Sun Aug 23, 2020 12:29 am
Location: Stoneham, Québec
Has thanked: 318 times
Been thanked: 140 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by BologneChe »

Caramel wrote: Sat Feb 04, 2023 4:53 pm

J'ai testé l'installation d'Easy 4.5.2 avec un clavier French-Canadian

Au premier lancement au choix du clavier en mode texte j'ai pris le nombre 8 pour cf.
Dans QuickSetup, j'ai choisi cf. Dans le choix des variantes (après le choix de la disposition ca) il y avait les mêmes options pour les variantes que pour 4.5.5 et en particulier pas de fr.
Je n'ai pas validé de choix pour la variante.

Section clavier dans 10-edev-puppy.conf correspondante

Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbRules" "xorg"
Option "XkbModel" "pc102" #xkbmodel0
Option "XkbLayout" "ca" #xkeymap0
Option "XkbVariant" "" #xkbvariant0
EndSection

Le clavier était en qwerty et la touche AD11 était conforme avec ^ et [

Conclusion : je pense qu'au démarrage il ne faut pas choisir de variantes et rester sur la disposition par défaut

Et pour rectifier sans réinstaller on doit changer le clavier de cf en us (par exemple). On revient ensuite à cf sans entrer de variante.
Un redémarrage peut être nécessaire.

Au vu de mon premier message la conclusion est un peu prétentieuse mais cette fois j'ai testé.

Complément d'information :
À chaque installation de EasyOS, je sélectionne le 8 pour la disposition du clavier. J'utilise l'assistant souris / clavier par la suite pour installer la variante (Multix) et ça fonctionne automatiquement (comme sur l'ensemble des Puppy).

Born to lose; live to win

bluefrog
Posts: 14
Joined: Sat Jan 14, 2023 12:31 am
Has thanked: 2 times
Been thanked: 5 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by bluefrog »

Merci @esmourguit et @BologneChe de prendre du temps pour résoudre ce défaut.

First, following @esmourguit advice, I retried the «Dispositions» (kbdlayout) of the keyboard with «qc» without success,
both: 1) with the correct initial configuration, and 2) after having changed to a «us» one.

Second, from the input of @BologneChe, I looked at /etc/X11/xorg.conf.d/10-evdev-puppy.conf to see the result
and got at line 25 and 26 :

Code: Select all

  Option      "XkbLayout" "qc" #xkeymap0             
           Option    "XkbVariant" "" #xkbvariant0

which should give me a correct keyboard layout since the keymap of /etc/X11/xkb/symbols/qc
has the correct keys : AD11 & AD12 brackets and AC11 & BKSL braces.

So the problem seems to be around the fact that the system didn't pick-up the kbdlayout requested ?

The only thing that I see reading the qc file with Geany is that line 25 start with a tab(of two spaces) indicated by a grey arrow
and only lines12, 24 and 25 have arrows(tab).
But, in bash, I think it doesn't make a difference.

Caramel
Posts: 490
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 102 times
Been thanked: 84 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by Caramel »

bluefrog wrote: Sun Feb 05, 2023 11:06 pm

Anyway, I found a second problem on Easy 4.5.2 and 4.5.5
Even if I don't touch the good working 'cf' keymap of the initial setup at installation,
which give perfect result for:
- terminal, geany and other apps in the main desktopk
- terminal in container
It doesn't work for the terminal or apps working inside dunfell container,
which present another fr-ca keymap but not the standard one.

I remember know, that it was not inadvertently that I tried to modified the setup. It was to try to solve this problem.

To BK: you made a comment in one of your file following a post by Feodor awhile ago bringing attention
to the german keyboard also not working inside a container. Problem that I think you solved. :-)

bf

Solution provisoire pour le problème, dans le terminal du container taper

setxkbmap ca

Il faut sans doute le faire après chaque lancement du container

bluefrog
Posts: 14
Joined: Sat Jan 14, 2023 12:31 am
Has thanked: 2 times
Been thanked: 5 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by bluefrog »

@Caramel: Cher cousin/cousine, je suis heureux de t'annoncer que la commande setxkbmap ca fonctionne! :-)
La répétition de la commande ne me rebute pas. J'utilise le container plusieurs heures à la fois pour rédiger, à l'aide du Composer de seamonkey, un aide-mémoire sur le langage de programmation nim.

The command setxkbmap ca in a terminal, works !
I'll be able to pursue my learning of nim, discovered after being recently underlined by BK. It offers: efficiency, similar python syntax, compilation to c or javascript, functional programming, ...
What's not to like :-) :-) :-)

bf

User avatar
BarryK
Posts: 2763
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 141 times
Been thanked: 756 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by BarryK »

bluefrog wrote: Tue Feb 07, 2023 7:49 pm

@Caramel: Cher cousin/cousine, je suis heureux de t'annoncer que la commande setxkbmap ca fonctionne! :-)
La répétition de la commande ne me rebute pas. J'utilise le container plusieurs heures à la fois pour rédiger, à l'aide du Composer de seamonkey, un aide-mémoire sur le langage de programmation nim.

The command setxkbmap ca in a terminal, works !
I'll be able to pursue my learning of nim, discovered after being recently underlined by BK. It offers: efficiency, similar python syntax, compilation to c or javascript, functional programming, ...
What's not to like :-) :-) :-)

bf

Great that you finally resolved the keyboard problem!

On the subject of nim, I am planning to checkout this new project:

https://github.com/neroist/uing

libui is a multi-platform library for creating GUI apps, and there is a nim wrapper for it:

https://github.com/nim-lang/ui

...which has become a dead project. There was some discussion:

https://github.com/nim-lang/ui/issues/43

...which has resulted in a fork, a new nim wrapper using libui-ng

Caramel
Posts: 490
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 102 times
Been thanked: 84 times

Experimental solution for wrong keyboard layout in container

Post by Caramel »

Experimental solution for wrong keyboard layout in container (Useless if you use the us keyboard layout) :

-Main added lines to the file /usr/local/easy_containers/logactivewindow :

if [ ! $ecDISPLAY == ":0" ]; then
xkbcomp :0 /tmp/server-0.xkb 1>/dev/null 2>&1 || true
xkbcomp /tmp/server-0.xkb $ecDISPLAY 2>/dev/null || true
rm /tmp/server-0.xkb 2>/dev/null
fi

Explanation : if the xserver's container is Xephyr ( = ecDISPLAY different from 0) (first line),
the keyboard layout (used in EasyOS) is written in a temporary file ( /tmp/server-0.xkb) (2nd line),
then Xephyr read and use this temporary file for configuring its keyboard layout) (3rd line).
Finally the temporary file is deleted (4th line).

-Delay in the white loop changed from 8 to 20

Do not install when a container is running . To remove the pet use PPM (icon PKg)
In case of trouble, remove the pet and reboot.

Thank you for the feedback

User avatar
BarryK
Posts: 2763
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 141 times
Been thanked: 756 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by BarryK »

Caramel,
Thanks for bringing this to my attention.
I suggest an alternative solution, just insert this into line 565 (or thereabouts, as latest ec-chroot is different from that in 4.101):

Code: Select all

#20230224 export keyboard layout
if [ "${ecDISPLAY/*:/}" != "0" ];then
 xkbcomp :0 /tmp/server-0.xkb
 xkbcomp /tmp/server-0.xkb $ecDISPLAY
 rm -f /tmp/server-0.xkb
fi

ec-chroot will have already started Xephyr server, so I think the above will work, unless I have overlooked some other factor.

User avatar
BarryK
Posts: 2763
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 141 times
Been thanked: 756 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by BarryK »

Caramel,
This is very interesting:

https://unix.stackexchange.com/question ... g-properly

So, instead of the code in last post, have just done this:

Code: Select all

setxkbmap -display :0 -print | xkbcomp - $ecDISPLAY
Caramel
Posts: 490
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 102 times
Been thanked: 84 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by Caramel »

Thanks BarryK for the improvement.
I didn't test as I don't know where to place the code.

PS : In my first tryouts, warnings of xkbcomp stop the script
(That's why there is " || true " in the code of the pet.)

According to https://www.ibm.com/docs/en/aix/7.1?top ... mp-command , there is an option (-w 0) that disables the warnings

User avatar
BarryK
Posts: 2763
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 141 times
Been thanked: 756 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by BarryK »

Thanks, I have put in "-w 0"

Caramel
Posts: 490
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 102 times
Been thanked: 84 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by Caramel »

I have tested in EasyOS 5.

The results are the same as in Easy 4.5.5

With keyboard fr, most trials the keyboard in container kirkstone is fr but sometimes it is us.
With keyboard ca, the keyboard in container is always us.

The export don't work

And the warnings are still present :

# cd /usr/local/easy_containers/
# ./ec-chroot kirkstone easy
no such user dhcpcd
sending commands to dhcpcd process
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Could not resolve keysym XF86EmojiPicker
Errors from xkbcomp are not fatal to the X server
Warning: Could not resolve keysym XF86EmojiPicker
Executing: DISPLAY=:1 ip netns exec kirkstone1ns pflask --mount=bind:/files/shared:/files/shared --keepenv --mount=bind:/tmp/.X11-unix/X1:/tmp/.X11-unix/X1 --no-ipcns --no-netns --mount=bind:/dev/snd:/dev/snd --mount=bind:/tmp/pulse-socket:/tmp/pulse-socket --mount=bind:/dev/dri:/dev/dri --caps=all,-sys_mount,-sys_admin,-sys_boot,-sys_chroot,-sys_ptrace,-sys_time,-sys_tty_config,-chown,-kill,-dac_override,-dac_read_search,-fowner,-setfcap,-setpcap,-net_admin,-mknod,-sys_module,-sys_nice,-sys_resource --no-userns --chroot=/mnt/sda45/easytest/containers/kirkstone/container -- /.control/ec-run kirkstone easy
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Could not resolve keysym XF86EmojiPicker
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Could not resolve keysym XF86EmojiPicker
Errors from xkbcomp are not fatal to the X server

Caramel
Posts: 490
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 102 times
Been thanked: 84 times

Re: French Canadian keyboard 'cf' reconfiguration problem

Post by Caramel »

The version of Xephyr in current EasyOS has options for keyboard.

So this is a new try for exporting keyboard layout in easy-containers :

In /user/local/ec-chroot , addition of

Code: Select all

MODEL=$(setxkbmap -query | grep model | cut -c 13-)
LAYOUT=$(setxkbmap -query | grep layout | cut -c 13-)
VARIANT=$(setxkbmap -query | grep variant | cut -c 13-)
OPTIONS=$(setxkbmap -query | grep options | cut -c 13-)

before the launch of Xephyr (line 262 and next)

Between Xephyr :${CNTxephyr} and -fullscreen, addition of

Code: Select all

 -xkb-model $MODEL -xkb-layout $LAYOUT -xkb-variant $VARIANT -xkb-options $OPTIONS

The full line :after the addition :

Code: Select all

  Xephyr :${CNTxephyr} -xkb-model $MODEL -xkb-layout $LAYOUT -xkb-variant $VARIANT -xkb-options $OPTIONS -fullscreen -title "${EXE}" -name "Xephyr${CNTxephyr}" -dpi "$DPI" -nolisten tcp &

Work for me with model pc102, layout fr, no variant and no options and container fossapup

Post Reply

Return to “EasyOS”