Hi everyone,
Are the on keyboard up and on keyboard down handlers used to purely detect keyboard input during an application?
If I want to set my Q key for example to quit my app at anytime, is there a way to do this via the keyboard handlers? I initially thought the best option was to create a button and set a key equivalent to it, and then hide the button-- but key equivalents don’t work when the button is hidden (or is there a way to make this work?). So I am looking at the keyboard handler stuff, but If I do a simple test like this:
on keyboard up theObject event theEvent
set the_key to (ASCII number of (get character of theEvent))
if the_key = 8 then display dialog "escape key was pressed!"
end keyboard up
I get nothing but beep sounds when I hit ESC…
thanks in advance for any insight provided.
-patrick