swick@ATHENA.MIT.EDU (Ralph R. Swick) (05/16/88)
Date: 16 May 88 02:26:51 GMT
From: mandrill!garg@ohio-state.arpa (Dev Datt Garg)
I have written a following code to create a textwidget. None of
the functions with Meta key work. I looked at the source code of
Xlibaw.a and found out that for finding out that which key has been
pressed, the function XLookupString has been used and that function
probably does not consider Meta key as a modifier key. So on the
screen you see ^] symbol in response to Meta key.
Meta is a synonym for modifier1 in the R2 Xt. Run xmodmap and see if
you have a key identified as modifier1. I suspect that you don't.
Secondly, I wanted to add some more key functions. I tried to make
'Cntr X' to execute function drawchar(), just to make sure that it
works the way I think, but it doesn't.
The code you included with your message is so broken, it's impossible
to tell what you think. One potential area of confusion is the
difference between XtAugmentTranslations() and XtOverrideTranslations().
Since the text widget has a binding for every key, XtAugmentTranslations
for a key event is a no-op. Making the minimal modifications to get your
example to compile and link and changing XtAugmentTranslations() to
XtOverrideTranslations() and running under a debugger confirms that
your additional action routine is being called.
Also can I change the cursor from ^ to something else.
Nope, sorry.