key accelerator bindings



We are using GTK 2.2.4 under MontaVista Linux with IceWM.  We have been
able to assign F1 thru F8,  Page Up, Page Down, Enter, and keypad Enter as
accelerator keys in our application, using the GTK accelerator group
functions.  But other keys are not working, including F9 thru F12, the
Print Screen key, and the up- and down-arrow keys.  Does something in the
envirornment absorb those keys before allowing them to be caught in an
app?  Here is a typical key-binding operation from our code:

        m_pVPVAccelGroup = gtk_accel_group_new();
        
        GClosure *      pSpoilerModeClosure             =
g_cclosure_new(G_CALLBACK(SpoilerModeHotKeyCallback), this, NULL);
        gtk_accel_group_connect(m_pVPVAccelGroup, GDK_F8,
GdkModifierType(0), GtkAccelFlags(0), pSpoilerModeClosure);
        g_closure_unref(pSpoilerModeClosure);

        gtk_window_add_accel_group(g_pTheMainWindow->GetGtkTopWindow(),
m_pVPVAccelGroup);

This works, but if I change just the keysym GDK_F8 to any of GDK_F9 thru
GDK_F12, it doesnât, and the callback is not activated.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]