#!/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 } '