# Bash on Linux, 38 bytes xev|awk 'NR%2/yc/{sub(/..$/,"",$7);print$7}' Unfortunately, I can't test it since I'm on MacBook on Linux - no PrntScr, no numeric keyboard &all.