XKMP(1) General Commands Manual XKMP(1)

xkmp - X11 keyconfig, xkbcomp setting helper

xkmp [-hHVls] [-f basefile] [-i inifile] [ -a outfile]
 

~$ xkbcomp $DISPLAY ./keymap.dfl
~$ xkmp -f keymap.dfl -i setting.ini	#output xkmp.out
~$ xkmp -a xkmp.out		#apply
( ~$ xkbcomp keymap.dfl $DISPLAY		#rollback)

-hHV
usage, version
-l
list for ini setting symbols/keycode etc
-s
output sample inifile
-f basefile
basefile made by ~$ xkbcomp $DISPLAY -
-i inifile
keymap setting file. see -s and edit

xkmp makes keymap config file for X11. X11 has standard keyboard setting system `xkbcomp`, but this is very complex so noone can handle it.
 
xkmp helps to make `xkbcomp` setting with more generalsyntax/files. keymap.ini accepts the below commands:
 
  define, modclear, keymv, keycp, keydef, modset, red, led, repeat
 
 
see xkmp -s about keymap.ini detail setting.

~$ cat << 'EEE' > mykey.ini
keymv <CAPS> :: <LCTL>	#swap caps<->ctrl
keymv <LCTL> :: <CAPS>
keymv <INS>  :: null	#kill ins
EEE
~$ xkbcomp $DISPLAY - > keymap.dfl ~$ xkmp -f keymap.dfl -i mykey.ini #>> output xkmp.out ~$ xkmp -a xkmp.out #>> apply keymap ~$ xev #>> test keysetting. push ins etc ~$ xkbcomp keymap.dfl $DISPLAY #>> rollback to default

suc/fail == 0/not 0

I used AutoHotKey(AHK) for keymappting. this app is the result of anger spill over for X11/xkbcomp.

posix-shell

Copyright (C) 2018 Momi-g

2021-09-07 v2.0.0

xkbcomp(1), xmodmap(1), xev(1), xbindkeys(1), xdotool(1)
 
wmctrl(1), bind(bash), zenity(1), dialog(1)
 
---recommend info https://www.charvolant.org/doug/xkb/html/node5.html http://pascal.tsu.ru/en/xkb/ https://wiki.archlinux.jp/index.php/X_KeyBoard_extension https://qiita.com/ZeptByteS/items/db1de2cbd940c65b8d1f https://github.com/mooz/xkeysnail ---official, but not recommend https://www.x.org/releases/current/doc/libX11/XKB/xkblib.html