❯ tldr xev
xev
Print contents of X events.
More information: https://gitlab.freedesktop.org/xorg/app/xev.
- Monitor all occurring X events:
xev
- Monitor all X events of the root window instead of creating a new one:
xev -root
- Monitor all X events of a particular window:
xev -id window_id
- Monitor X events from a given category (can be specified multiple times):
xev -event event_category
xev | awk -F'[ )]+' '/^KeyPress/ { a[NR+2] } NR in a { printf "%-3s %s\n", $5, $8 }'
tldr xmodmap
xmodmap
Utility for modifying keymaps and pointer button mappings in X.
More information: https://manned.org/xmodmap.
- Swap left-click and right-click on the pointer:
xmodmap -e 'pointer = 3 2 1'
- Reassign a key on the keyboard to another key:
xmodmap -e 'keycode keycode = keyname'
- Disable a key on the keyboard:
xmodmap -e 'keycode keycode ='
- Execute all xmodmap expressions in the specified file:
xmodmap path/to/file
xmodmap -e <KEYCODE> <MODIFIER> = <behaviour> <behaviour_with_modifier>
- Get current key configuration
xmodmap -pke | grep -Pw "37|134"
- output (Capture keys number 37 & 134 )
keycode 37 = Multi_key NoSymbol Multi_key
keycode 134 = Super_R NoSymbol Super_R
- Swap key configuration: Create $HOME/.Xmodmap file
keycode 37 = Super_R NoSymbol Super_R
keycode 134 = Multi_key NoSymbol Multi_key
cat << EOF > ~/.Xmodmap
keycode 37 = Super_R NoSymbol Super_R
keycode 134 = Multi_key NoSymbol Multi_key
keycode 105 = Control_R NoSymbol Control_R # reponiendo el keycode original <CTRL> del lado derecho
EOF
cat << EOF > ~/.zshrc
[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap
EOF
https://gist.github.com/kljohann/67cb8c78758af17f0710693f35dc8888
cat << EOF > ~/.XCompose
<Multi_key> <n> : "ñ"
<Multi_key> <N> : "Ñ"
<Multi_key> <a> : "á"
<Multi_key> <A> : "Á"
<Multi_key> <e> : "é"
<Multi_key> <E> : "É"
<Multi_key> <i> : "í"
<Multi_key> <I> : "Í"
<Multi_key> <o> : "ó"
<Multi_key> <O> : "Ó"
<Multi_key> <u> : "ú"
<Multi_key> <U> : "Ú"
EOF
/snap/bin/flameshot gui
keysym 4 = 4 dollar EuroSign NoSymbol
keysym space = space NoSymbol nobreakspace NoSymbol