Re: [gtk-list] How to catch accelerators
- From: Tim Janik <timj gtk org>
- To: Noel Burton-Krahn <noel burton-krahn com>
- cc: Gtk+ MList <gtk-list redhat com>
- Subject: Re: [gtk-list] How to catch accelerators
- Date: Mon, 20 Mar 2000 23:32:15 +0100 (CET)
On 20 Mar 2000, Noel Burton-Krahn wrote:
>
> Hi,
>
> I have a main window with a menu and a couple of text boxes. The menu
> has keyboard accelerators. After a user types in a text boxes, the
> box hogs the keyboard focus. Once a text box has the focus, key
> events never trigger my menu accelerators.
>
> My question: How do filter keyboard events for accelerators mo matter
> what control has the focus?
i guess the main problem here is that the text widgets key press handler
always returns TRUE (for event-is-handled) and thus the accelerator
bindings are never tried.
we may give accelerators precedence in future gtk versions (to work around
similar problems occouring for plug/socket combinations), however untill
then, you might get away with:
gtk_signal_connect_after (GTK_OBEJCT (text_widget), "key-press-event",
GTK_SIGNAL_FUNC (gtk_false), NULL);
>
> --Noel
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]