Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] setxkbmap vs fix-xkbmap vs xorg's conf  (Read 142 times)

Offline gour

  • User
  • Posts: 35
[EN] setxkbmap vs fix-xkbmap vs xorg's conf
« on: 2024/11/04, 12:15:04 »
Hello,

another small glitch...I use
Code: [Select]
setxkbmap -option "ctrl:swapcaps" to autosart in Xfce's session to swap Ctrl & CAPS keys.

However, I notice that after inserting/removing some USB devices, the things reset. Researching on the internet revealed that adding a keyboard option to xorg's configuration file, might be a better solution and so I've added it to
Code: [Select]
/etc/X11/xorg.conf.d/00-keyboard.conf which now looks as follows:

Code: [Select]
# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "hr"
        Option "XkbVariant" ""
        Option "XkbOptions" "ctrl:swapcaps"
EndSection

So far, *knock, knock*, it does work, but I wonder if there might be some better alternative?

Also, after fresh Xfce install, there was invocation of "fix-xkbmap" app, which I haven't encountered so far. For now, I disabled both this app and “setxkbmap”, curious what does "fix-xkbmap” do?


Sincerely,
Gour