Created
February 27, 2019 08:33
-
-
Save joepvd/7613bc944a76e353345c8e38e4cea9c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# No more peck and hunt with xev! | |
# By Joep van Delft, github.com/joepvd | |
xev | | |
awk ' | |
BEGIN { | |
FS="[ (),]+" | |
fmt = "%-7s %-4s %-6s %s\n" | |
printf fmt, "action", "code", "sym", "name" | |
printf fmt, "-------", "----", "------", "----" | |
} | |
/^KeyPress/ { action = "press" } | |
/^KeyRelease/ { action = "release" } | |
/keysym/ { printf fmt, action, $5, $7, $8 } | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment