Keypress events
| From: | Neil Eisgruber | Date: | Sat, 20 Aug 2005 15:37:43 +0000 |
| Subject: | Keypress events | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-6175@lists.php.net to get a copy of this message | ||
Hello,
In the application that I have been working on I am trying to capture the
presents of the ctrl button being held down while the user clicks the mouse.
This is for action within a GtkCTree. I can't figure out a way to check for the
presents of the ctrl button on the 'select_row' event of the tree so I wanted to
set a variable when the ctrl key is pressed or released. To do this I connected
the key_press_event and key_release_event to my main window. Then wrote
functions for that sets a boolean.
The result is the key_press_event works fine and sets my boolean, the
key_release_event does nothing.
I am connecting by using:
$window->connect("key_press_event", "ctrl_pressed");
$window->connect("key_release_event", "ctrl_released");
Anyone have any ideas why this happens?
Thanks for any help and also for all of the previous help with my other issues!
Neil