arch wiki - xmodmap
outdated, use xkb instead
still useful for viewing what modifiers are set to, run with
xmodmap
pacman -S xorg-xmodmap
xev, keyboard event viewer, also useful tool, run with
xev
pacman -S xorg-xev
pacman -S xorg-xkbcomp
complicated as hell, can't say too much about this
if you screw up, can make keyboard unusable, first store
default config
xkbcomp $DISPLAY output.xkb
setxkbmap -layout us
once you make custom keymap at ~/.Xkeymap
, put in
~/.xprofile
at startup:
test -f ~/.Xkeymap && xkbcomp ~/.Xkeymap $DISPLAY
use case: qmk
"hyper" (not in
the linux modifier sense) is
ctrl_L + shift_L + alt_L + super_L
use this as
i3
mod, need secondary modifier that can't be
ctrl/shift/alt/super
use super_R
as unused mod3
to
distinguish
comment out (not necessary, no clue what this does)
interpret Super_R+AnyOf(all) {
virtualModifier= Super;
action= SetMods(modifiers=modMapMods,clearLocks);
};
change Super
to Mod3
here
interpret Super_R+AnyOfOrNone(all) {
action= SetMods(modifiers=Super,clearLocks);
};
modifier_map Mod4 { <RWIN> };
n.b.: I no longer use this, it's simpler to make
hyper
shift_L + alt_L + super_L
(still unlikely to
conflict with other keybindings) and use ctrl
as
a secondary modifier