registering if a key is down

I want to attach the script to the application not a object of the application.
I have a series of nssteppers. I want the APPLICATION to see if the Option key is down.
If down it will toggle the increment value from 1 to 10. And reversed if it is released.

The problem if I attach it to the steppers (mouse down)it only registers after the click thus it increments 1 more time at whatever is the toggled state. key down or up doesnt recieve the event from the stepper at all.

Any Ideas at all… I am at a loss.

Thanks

I don’t have an answer for you, but hopefully I can point you in the correct direction. Look at the “event” class. Events such as “mouse down”, “mouse up”, “keyboard down” and “keyboard” up return an ‘event’ parameter that contains many properties associated with the event.

Hope this helps,
Brad Bumgarner, CTA

I have looked at the handlers that you mentioned. The problem is WHEN the event is registered. I tried keyboard down and up, mouse down and up with the file owner, main window, with limited success. I haven’t found a event that happens enough to toggle the incrementer of the nsstepper. I know that every key event is passed to the application and is altered and or passed down to the differant objects of the application. I need to be able to attach the handle on a object high enough to recieve the option key event. I am very cusious why the keyboard down and up attached to the file owner doesn’t get sent the key event. Isn’t that the highest accessible object… well except for the menu.

Anyways thanks foe making an attempt.