Skip to content

Instantly share code, notes, and snippets.

@fatso83
Created April 11, 2018 10:14
Show Gist options
  • Save fatso83/2370679439479dcc27eb602e8ce6b3de to your computer and use it in GitHub Desktop.
Save fatso83/2370679439479dcc27eb602e8ce6b3de to your computer and use it in GitHub Desktop.
#!/bin/sh
## Debug what is capturing your keyboard shortcut
/bin/echo -e "\nSee https://askubuntu.com/questions/925732/keyboard-shortcuts-stop-working-intermittently/926156#926156\n"
KEY="$1" # the combination that was "grabbed"
xdotool keydown "${KEY}"; # start pressing the key combo
xdotool key XF86LogGrabInfo; # the keysym that when emitted asks X to print info on the grabber of the current keys
xdotool keyup "${KEY}" # stop pressing the key combo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment