On 02.04.2008, at 14:19, Edzard Egberts wrote:
> MacArthur, Ian (SELEX GALILEO, UK) schrieb:
>> I don't think you can use the arrow keys for shortcuts, because they
>> tend to get eaten up by other widgets first, e.g. any sort of text
>> widget that gets the focus will swallow any arrow keys it sees, for  
>> text
>> navigation, and at a higher level, arrow keys get eaten by widget
>> navigation...
>
> As far as I know, the operating system first calls Fl_Window::handle()
> and all the other widgets handle() methods are called out of the
> Fl_Window::handle() (Group handling). I think, by overwriting
> Fl_Window::handle() it should be possible to catch arrow key events
> before beeing dispatched to all the widgets and decide, whether it
> should go directly to a special widget (active widget with special  
> type).

Nope, the widget that has the focus gets the keyboard event first,  
then all its parents. If that didn't work, the keystroke is sent again  
as a SHORTCUT, but this time to the widget under the mouse pointer,  
then all its parents, then all shortcut handlers. An arrow key however  
will most likely be used up before reaching the shortcut handler.

----
http://robowerk.com/


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to