I would like to add a new keyboard layout (FR - AZERTY AFNOR). What is the correct way to do it ?

Ideally I would like to use it for everything:

  • full disk encryption
  • TTY
  • xenodm
  • xenocara session

For now, I updated /usr/X11R6/share/X11/xkb/symbols/fr to add the variant, which I load in xenodm and my xsession using setxkbmap.

However I feel like it’s not “clean” as it should be done with wsconsctl .

So what is the correct way to do it ?

    • z3bra@lemmy.sdf.orgOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I eventually managed to do it with /etc/wsconsctl.conf. You can load a base layout (“fr” in my case), and remap keys as you want using their symbols. Here is an exerpt from what I’ve done:

      keyboard.encoding=fr
      keyboard.map+="keycode 1 = at numbersign dead_breve dead_invertedbreve"
      keyboard.map+="keycode 2 = agrave 1 section Agrave"
      keyboard.map+="keycode 3 = eacute 2 dead_acute Eacute"
      keyboard.map+="keycode 4 = egrave 3 dead_grave Egrave"
      […]
      

      The hardest part is to figure which keycode correspond to which key on the keyboard, but it’s not too hard if you dump the base layout with wsconsctl keyboard.map before-hand.