dotfiles/.local/bin/keycode

4 lines
99 B
Bash
Executable file

#!/bin/bash
xev | awk -F'[ )]+' '/^KeyPress/ { a[NR+2] } NR in a { printf "%-3s %s\n", $5, $8 }'