Re: Intercept "Enter" key

Damien (dams@ina.fr)
Thu, 13 Mar 1997 15:19:20 +0100

To subscribers of the xforms list from "Damien" <dams@ina.fr> :

>To subscribers of the xforms list from EAD-Frank.Stefani@t-online.de (Frank
>Stefani) :

> I want to intercept the "Enter" key from user input

Hi

I'm not a Xforms specialist but have you tried using a pre-emptive handler
which intercepts the FL_KEYBOARD event ? (routine fl_set_object_prehandler)
You just have to test if the 'key' value passed to that handler is equal to the
keysym value of the enter key (see X11/keysymdef.h) and :

o if it's the case, do the DB operations you need then return FL_PREEMPT so
that the normal handler doesn't get that event.

o If not, just return 0 and the normal handler will treat the event.

See the doc for more info about pre-emptive handlers.

Sorry for my poor english... I'm french.

Damien

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/xforms-archive/