System: Slackware Linux (version 15.0)
CPUs: Intel(R) Core(TM) i5-3230M CPU @2.60GHz
GPU: Mesa DRI Intel(R) HD Graphics 4000
Deps: xcape-1.2.tar.gz
A. Olsson's xcape.
https://github.com/varehus/xcape
xcape-1.2.tar.gz
xcape.tar.gz
bash-5.1# installpkg --terse xcape-1.2-x86_64-1_SBo.tgz
xcape-1.2-x86_64-1_SBo: Linux utility to configure modifier keys .................. [ 80K]
bash-5.1#
Tap Left Alt, type c then u renders ∪.
bash-5.1$ cat ~/.XCompose
include "%L"
<Multi_key> <minus> <greater> : "→"
<Multi_key> <m> <o> : "∈"
<Multi_key> <c> <u> : "∪"
bash-5.1$ cat ~/.Xmodmap
keycode 248 = F13
bash-5.1$ diff /etc/X11/xinit/xinitrc.kde .xinitrc
26a27,30
> if [ -f ~/.xprofile ]; then
> . ~/.xprofile
> fi
bash-5.1$ stat -c '%a' ~/.xinitrc
644
bash-5.1$ cat ~/.xprofile
if type xcape >/dev/null 2>&1; then
xcape -e 'Alt_L=Multi_key' &
fi
bash-5.1$ grep -E '2192|2208|222A' /usr/local/plan9/lib/keyboard
2192 -> → right arrow
2208 mo ∈ element of
222A cu ∪ union
bash-5.1$ man xcape \
> | sed -n '4s/^[^-]*-\s*//p'
use a modifier key as another key
bash-5.1$
In your ~/.xinitrc file before the merge blocks add for GTK programs the following line.
export GTK_IM_MODULE="xim"
GNOME users need to deal with ibus.