Hi.  I've written a modestly successful file manager for Tiny Core Linux called 
Fluff, which is built with FLTK 1.1, since that's what's shipped with Tiny 
Core.  I have some other FLTK apps out there too.  I like FLTK, but I'm stuck 
on something.

I've been trying to squash some usability annoyances lately.  One issue I've 
had is that I have a global key event handler that should catch the enter key 
(user selects a file in the list window, then presses enter to automatically 
run the preferred associated app for that kind of file).  The associated app is 
launched with a call to system(), so it is running as a separate process.  For 
sample, the associated app may be the vi text editor running in a terminal 
shell:

   system("aterm -e vi $FILE &");

The user looks at/changes the file and eventually closes it by typing

   :q[enter]

Now, back in my filemanager, a shortcut keypress is passed to the global key 
handler callback function with the enter key event.  It seems that the child 
process and it's window does not fully consume the enter key press event, but 
it gets duplicated back up to the parent (the file manager).

I've also seen the same type of behavior with child windows opened with 
fl_message() and similar functions... the escape key event associated with the 
close/cancel button and the enter key event associated with the default/OK 
button gets sent up to the parent, who does not want it!

Why is this?  How can I either prevent this from happening or clearly 
distinguish this kind of keyboard shortcut that closes a child window?

One additional complication is the exact events and event sequence will vary by 
window managers... I've seen some differences between FLWM and e17 for example 
which makes blocking the unwanted key messages even harder.  I've heard of a 
"do-not-propogate" mask in X, but I don't know if I can do anything with that 
in FLTK.

Thanks for any hints or further troubleshooting ideas.
--
Mike Lockmoore
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to