escape key in text field

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

4 posts / 0 new
Last post
escape key in text field

Submitted by Anonymous on Wed, 10/03/2001 - 09:32. Developers
I have several XmTextfield widgets on a dialog. I need to post a specific value in the text field if the user presses the escape key. But my text fields do not receive escape key press event in its modify/verify callback. Why is escape key not recognized? I know I did not remap the key using xmodmap or does any thing to remap it in my application. Any info. is much appreciated.
Thanks.
skan

ICS_support

Take a deep breath.

In the VirtualBindings(3X), you`ll find that there`s a binding from the logical KCancel key to the virtual osfCancel key.

In the XmText[F] key bindings, osfCancel is bound to a process-cancel() action.

And in the server bindings file for the user, sometimes .motifbind and certainly in bindings/ in the top-level directory, osfCancel is bound to Esc.

All of which means that Esc is grabbed by the widget, and that`s the way that it probably should be; the user expects that action to be called.

You could augment the actions if you must add on.

Anonymous

dbl,
Yes, I found the bindings file in /usr/dt/lib/bindings. I agree it would be best to leave well enough alone, unfortunately I must provide this action. It would seem that if I modify the binding file it will affect all applications. How do I augment the cancel action for only specific widget?
Thank you for your earlier response which helps point me in the right direction.
skan

ICS_support

You can augment the translations for this widget. See the pages at http//www.motifzone.com/resources/man/XtAugmentTranslations.html . You can add your own action on the Esc which handles the cancel and does an action that you provide.

Simply changing the actions may confuse the user, who has a reasonable expectation that this XmText behaves like the others in the applications on the desktop.