Re: grabbing keystrokes from gnome-terminal
- From: James Henstridge <james daa com au>
- To: Aldy Hernandez <aldy uaa edu>
- cc: gnome-devel-list gnome org
- Subject: Re: grabbing keystrokes from gnome-terminal
- Date: Fri, 12 Mar 1999 09:03:18 +0800 (WST)
What is the contents in the app structure? Is it the ZvtTerm widget or
some other container? (it is probably a container, since there is a
scrollbar at the side). If it isn't the ZvtTerm widget, then that would
be your problem.
When an event is generated, GTK sends it to the widget which has focus.
It will call a signal handler (maybe button_press_event or something), and
if it returns TRUE, the event is considered to be handled. If not, the
event is passed on to the parent and so on. If the ZvtTerm is handling
the events, the parent widgets will never see them.
So the best solution is to connect the signal handlers directly to the
ZvtTerm widget.
James.
--
Email: james@daa.com.au
WWW: http://www.daa.com.au/~james/
On 11 Mar 1999, Aldy Hernandez wrote:
> hi, for the guile macros hack i'm trying to have a scheme function be
> executed ever time a key is pressed and another callback for when a
> character is displayed on the screen.
>
> i already have the callback mechanism working for mouse clicks like so:
>
> gtk_signal_connect (GTK_OBJECT (app->contents),
> "button_press_event",
> some_function, NULL);
>
> however, replacing "button_press_event" by "key_release_event" (or
> "key_press_event") doesn't work at all. the function doesn't get
> called at all.
>
> what is the best way to have a callback be called every time a key is
> hit and when a character is printed on the ZVT? so far, the
> information i have at my disposal when i call gtk_signal_connect() is
> the a ZvtTerm* and the GnomeApp*.
>
> should this be done through a zvt_?? function call or through some
> other signaling mechanism?
>
> newbie out.
>
> Aldy
>
>
> --
> To unsubscribe: mail gnome-devel-list-request@gnome.org with "unsubscribe"
> as the Subject.
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]