question about keyboard input/hidden buttons and key equiv

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.


I have a splash screen with a hidden button that gets called when the user hits (fn)F1, it worked fine for me untill i used a “delay” function to keep my splash creen visible but when my app is in “delay” it is frozen
Sorry, that doesnt really help u does it :frowning: chek if you are using a delay function

Hmm… well I think I realized that if I use “transparent” buttons vs. “hidden” ones, they work better for this kind of application…

Did you try changing your hidden button to transparent and see if that fixes your problem?