Re: Intercept "Enter" key

Damien (
Thu, 13 Mar 1997 15:19:20 +0100

To subscribers of the xforms list from "Damien" <> :

>To subscribers of the xforms list from (Frank
>Stefani) :

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


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.


To unsubscribe, send the message "unsubscribe" to or see
Xforms Home Page:
List Archive: