[comp.windows.x.motif] Supressing keystroke echo in XmText widgets

scholz@osf.org (07/10/90)

Maria Nadeau <maria@kaui.coral.com> wrote:
> I'm trying to make a "secure" text field by adding a ModifyVerify
> callback which copies the user's keystoke off into a private buffer
> and sets the XmTextVerifyCallbackStruct's doit field to False.  This
> works as expected and allows me to intercept the keystokes, but a side
> effect of clearing the doit flag is that the machine beeps!  

> I really don't want to start futzing around with installing my own
> event handler to get the keystrokes.  Anyone know how to tell it not
> to beep?  Can anyone think of a better way to do this?

Unfortunately, in Motif 1.0, the default is to have the bell sound
whenever the verification returns without continuing the action.  But, in
Motif 1.1, there is a new resource for Text widgets called XmNverifyBell. 
Setting it to False will turn off the above bell.  For now, you might try
messing with a call to XChangeKeyboardControl().

Hope this helps,
Carl Scholz             OSF/Motif QA         scholz@osf.osf.org