On 2009-07-06, Greg Ercolano <[email protected]> wrote:
>> 1. if key "C" is pressed do something
>> 2. while the key is held down, do nothing
>> 3. when the key is released, do something else
>> 
>> i have a global menu and put an item inside, but i couldn't find a way to 
>> call the callback when the key is released.
>
>       Make a handle() method for your window that handles
>       the FL_KEYUP/FL_KEYDOWN events, using Fl::event_key()
>       to get which key was pressed.
>
>       Note that to get these events properly you must respond
>       to FL_FOCUS and FL_UNFOCUS ("respond" meaning return(1))
>
>       For more info, see the comments in FL/Enumerations.H above
>       the FL_KEYDOWN macro, as well as the docs on handling events.

thank you greg, works great :D
JanE
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to