- From: Shiraz Baig <shiraz_baig yahoo com>
- To: gtk-list gnome org
- Subject: reading keyboard
- Date: Sun, 18 May 2003 01:28:03 -0700 (PDT)
I am trying to read the keyboard input. I do not
want to display the input.But I just want to be
able to give it to my application so that
I can send it on the network.
I have used following methods, with no success in
1) I have used key_press_event, but it does
not give me the key, which has been pressed.
2) I have tried to use "entry" type of widget, I
can hide the input, but the reading of char is not
available, till the control is returned to
gtk_main(). So, I cannot use it. Moreover, I am
using a text type of widget and not an enry type of
3) I also tried to use "text" type of widget.
Again, I cannot read it till the control is returned
4) I also tried the reading of the file descriptor.
For example, gtk_input_add (fileno(stdin)........).
But it does not get activated.I mean the callback
does not get activated when I type something, so I
cannot read the key. I also used
FILE *input = fopen("/dev/tty", "r") and then
fileno(input) to read it. But again no success.
Could someone pleasegive me a method of reading a
key from the keyboard without displaying it anywhere
it in any window?
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
] [Thread Prev