Suggested usage:
"Download":http://github.com/nriley/keyboardViewer/downloads and install keyboardViewer:
bc. sudo install keyboardViewer /usr/local/bin
Trigger with an AppleScript or shell script, e.g.:
bc. tell application "System Events" if exists (process "Keyboard Viewer") then click process "Keyboard Viewer"'s window 1's buttons whose subrole is "AXCloseButton" else do shell script "/usr/local/bin/keyboardViewer" end if end tell
The above will show Keyboard Viewer if it’s not running, and close it if it is.
I run the above script from "FastScripts":http://www.red-sweater.com/fastscripts/.
The keyboardViewer utility isn’t necessary on Mac OS X 10.5 because simply opening KeyboardViewerServer does the same thing.