Skip to content

Instantly share code, notes, and snippets.

@nrolland
Created March 7, 2011 10:17
Show Gist options
  • Save nrolland/858339 to your computer and use it in GitHub Desktop.
Save nrolland/858339 to your computer and use it in GitHub Desktop.
display keyboard applescript/lion et SL
set proc_ to "/System/Library/Input\\ Methods/KeyboardViewer.app/Contents/MacOS/KeyboardViewer"
set app_ to "KeyboardViewer"
try
do shell script "ps -axwww | grep" & space & proc_ & space & "| grep -v grep"
tell application app_ to quit
on error
do shell script proc_ & space & "> /dev/null 2>&1 &"
end try
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment