Skip to content

Instantly share code, notes, and snippets.

@joepvd joepvd/xevkeys
Created Feb 27, 2019

Embed
What would you like to do?
#!/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
You can’t perform that action at this time.