I wanted to use the control and option/alt keys on a Mac to toggle modes of a Tool I am developing. I trapped the keycodes in the Tool’s onKeyDown event and processed them. This worked well until I opened a UI.inputbox within the control key processing in onKeyDown. When I do that, the next press of either the control or option/alt key does not cause any event to be seen. It takes a double-tap to get an event. Then all is well again until the next time the inputbox is opened.
The attached Ruby demonstrates this behavior (it adds an Extensions menu item named onKeyDownTest to activate the Tool. The issue occurs on both SU 2016 and 2015 as well as on every release of OS X I have accessible to test. It does not happen on Windows (where I use tab instead of option/alt because alt is bound by the system to select a menu).
onkeytest.rb (1020 Bytes)
This feels like a subtle bug, but I want others verify that this glitch happens on their Macs (and does not happen on Windows) before reporting it.