# To subscribers of the xforms list from Matt Yaconis <myaconis@nlxcorp.com> :
I see your dilemma...I cannot comment on whether or not xforms can be
configured to allow all the keyboard input to go to the input object.
However...
As a work-around you might consider
1) adding a hidden input field and giving that object "focus" when you want
the spacebar to activate your PTT button. (Or add some other mechanism for
managing that state. One input object on a form ALWAYS has focus when the
window is active.)
2) registering a raw callback routine for the form that gets executed
whenever the user presses a key on the keyboard. E.g.
fl_register_raw_callback( fd_the_form->the_form,
KeyPressMask,
key_press_cb );
This function should handle spacebar presses based on the state mechanism
you are using for step 1. i.e. either add a space into the current input
field and return FL_PREEMPT...to stop the event from activating the PTT
object...or return 0 (or whatever the enumeration is for NOT intercepting
the event).
OR you might consider doing the reverse...removing the shortcut from the PTT
button and having the key_press_cb push the PTT when certain conditions are
met. (Might cause bad side effects on the push button though...)
Perhaps this will spark other ideas from people that are a bit less
cumbersome.
-----Original Message-----
From: Jeff [mailto:piercejhsd009@earthlink.net]
Sent: Thursday, August 29, 2002 10:45 PM
To: xforms@bob.usuhs.mil
Subject: Re: XForms: Some xforms implementation questions.
# To subscribers of the xforms list from Jeff <piercejhsd009@earthlink.net>
:
Here's what I have.
I have a button that is a radio like PTT, I have in it's attributes for
teh space bar to be a shortcut. Ok, that works fine, can activate PTT by
either clicking the button, or entering space bar.
But, I also have input objects, and even when I give them focus and am
typing in data, a space bar does not go to the input field, but still
activates the PTT button.
So, if a wiget has the focus, it does not mean that it will get all
input first. Is that true?
spl@ncmir.ucsd.edu wrote:
> # To subscribers of the xforms list from spl@ncmir.ucsd.edu :
>
>
>>How do you make the actual window the focus? I have one input box and
>>only want it have focus when it is clicked on and give up the focus back
>>to the window after the data is input. Plus, clicking on the window
>>background gives it the focus.
>
>
> Focus policy is largely a function of your window manager. I'm not
> sure what you want to do is possible without making the window go
> away.
>
> I suppose you could play some trick by warping the pointer (cursor)
> but moving the user's pointer is generally considered anti-social.
>
> I can't think of an X application that does what you suggest.
>
> Anyone else?
>
> spl
> _________________________________________________
> To unsubscribe, send the message "unsubscribe" to
> xforms-request@bob.usuhs.mil or see
> http://bob.usuhs.mil/mailserv/xforms.html
> XForms Home Page: http://world.std.com/~xforms
> List Archive: http://bob.usuhs.mil/mailserv/list-archives/
>
>
-- Jeff piercejhsd009@earthlink.net_________________________________________________ To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuhs.mil or see http://bob.usuhs.mil/mailserv/xforms.html XForms Home Page: http://world.std.com/~xforms List Archive: http://bob.usuhs.mil/mailserv/list-archives/ _________________________________________________ To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuhs.mil or see http://bob.usuhs.mil/mailserv/xforms.html XForms Home Page: http://world.std.com/~xforms List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Fri Aug 30 2002 - 08:13:25 EDT