Reputation: 9590
I just wrote a "on start up" script for Mac OS X and want it to NOT fire if I hold down a key, e.g. the shift key.
Anyone know how to check if the shift key is down from a bash script?
Upvotes: 1
Views: 590
Reputation: 120031
You need to interface with a Mac-OS-X-specific API that has this "hold down a key" concept. There's no such thing in bash, nor in related Unix/POSIX APIs. Doubly so with the modifier keys like Shift or Control.
Upvotes: 2