keyboard events

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

Questions about motif? Contact us

Submitted by Anonymous on Thu, 03/27/2003 - 11:20.

Hi, I`m new to X programming and Motif. What I want is to disable some special characters, like `?`, in some windows. I started off writing a function that checks if the input is `?` at which I disable the character by ``.
Then a parse the translation table with #override function()
Then I tested my code, and realized that no key worked. But then again, I had overridden all keyboard events, or what? So I re-wrote the functino so that if the key pressed isn`t `?` it calls XmTextInsert. Now things were rolling, but hey, Return and Backspace don`t work.
What I thought in the beginning is that when I call function() at the event of key pressed, if the key didn`t match some criteria default action would be taken, like Return for example. But apparently this isn`t the case, or am I misunderstanding things?? Sould I rather make function() do nothing at all and call it with eth function() to skip writing code for Return etc.
Can someone give me some tips about a way to do this, i.e. to disable some characters. Hope you understand me ;)

Wed, 07/25/2012 - 13:33
#1
2 posts / 0 new
Last post
7
Wed, 07/25/2012 - 13:33