开发者

In bash scripting, how can one check if a key is down?

I just wrote a "on start up" script for Mac OS X and want it t开发者_运维问答o 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜