On Tue, Jun 25, 2002 at 10:15:08AM +0200, Sven Neumann wrote:
> Hi,

Hi Sven,

> I've just checked with GTK+-DirectFB-2.0.5 and I can navigate the
> GtkCList from testgtk using the cursor keys.

Hmmm.

> Of course you have to
> focus it first (using the Tab key).

Tab or Alt-Tab?  If Alt+Tab, is there any way I can configure an LIRC
key to be an Alt+Tab?

> You can force focus to the clist
> by inserting a call to gtk_widget_grab_focus().

I tried this in my app with still no cursor key (via LIRC)
functionality in my GtkCList.

So I went a step further and hooked up callbacks to the focus_in_event
and key_press_event signals to see if my GtkCList was getting focus
and if my LIRC "keystrokes" were making it to the GtkCList, and they
all are.  Here is the signal registration and my callback for the
key_press_event:

  gtk_signal_connect(GTK_OBJECT (programList), "key_press_event",
                     GTK_SIGNAL_FUNC (on_programList_key_press_event),
                     NULL);

  gboolean
  on_programList_key_press_event (GtkWidget       *widget,
                                  GdkEventKey     *event,
                                  gpointer user_data) {

    fprintf(stderr, "key_press (%x) for widget %s\n", event->keyval,
            gtk_widget_get_name(widget));

    return TRUE;

  }

And when I run my application on directfb I get the following output
from pressing the up and down (respectively) keys on my remote:

# /usr/src/openpvr/chooser/src/chooser 
(*) parsing config file '/etc/directfbrc'.

       ---------------------- DirectFB v0.9.13 ---------------------
             (c) 2000-2002  convergence integrated media GmbH  
             (c) 2002       convergence GmbH                   
        -----------------------------------------------------------

(*) Single Application Core. (with MMX support) (2002-06-24 06:58)
(*) DirectFB/misc/memcpy: using MMXEXT optimized memcpy()
(*) DirectFB/InputDevice: IMPS/2 Mouse 0.9 (convergence integrated media GmbH)
(*) DirectFB/InputDevice: LIRC Device 0.2 (convergence integrated media GmbH)
(*) DirectFB/InputDevice: Keyboard 0.9 (convergence integrated media GmbH)
(*) MMX detected and enabled
(*) DirectFB/GraphicsDevice: Matrox G400/G450/G550 0.6 (convergence integrated media 
GmbH)
building program_list for folder /video/
Gdk-DirectFB-Message: gdk_pango_context_get assumes a screen resolution of 72 dpi
focus_in for widget GtkCList
key_press (ff52) for widget GtkCList
key_press (ff54) for widget GtkCList

So it seems that the GtkCList (programList) is getting the keypress
events and they are the right ones (from
/usr/include/gtk-2.0/gdk/gdkkeysyms.h):

#define GDK_Up 0xFF52
#define GDK_Down 0xFF54

so I am at a loss as to why my GtkCList is not reacting to the keys
when I remove the signal handler for key_press_event.

Any more ideas?  Any further tests I can do?

b.


-- 
Brian J. Murrell

Attachment: msg00705/pgp00000.pgp
Description: PGP signature

Reply via email to