You are not logged in.

#1 2018-04-26 16:31:53

etnull
Member
From: Hackerland
Registered: 2018-04-26
Posts: 33

Custom keyboard layouts for xorg (without DE)

I did my own keyboard layout by editing layout files in /usr/share/X11/xkb/symbols/* and /usr/share/X11/xkb/rules/*
then to load my layout I edited /etc/X11/xorg.conf.d/60-keyboard-layouts.conf
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us,ru"
        Option "XkbModel" "pc105"
        Option "XkbVariant" "basic,my_layout"
        Option "XkbOptions" "grp:alt_shift_toggle,lv3:ralt_switch_multikey"
EndSection
Obviously I would prefer not to mess with system files, how can I load my layouts from any directory,
but with a notion that I cannot use setxkbmap (layout resets each time I unplug my keyboard)

Offline

#2 2018-04-26 18:16:47

nesk
Member
Registered: 2011-03-31
Posts: 187

Re: Custom keyboard layouts for xorg (without DE)

There are environment variables that affect keyboard-related stuff in X (and at least some wayland compositors, for that matter) - XKB_CONFIG_ROOT is probably what you need.
For more info check /usr/include/xkbcommon/*.h  files.

Offline

#3 2018-04-27 23:07:14

damjan
Member
Registered: 2006-05-30
Posts: 462

Re: Custom keyboard layouts for xorg (without DE)

run `setxkbmap -layout us,ru -option …` from whatever you start (.xinitrc, .xprofile …)

Offline

Board footer

Powered by FluxBB