- if (g_isIdle)
- wxapp_install_idle_handler();
-
- if (g_blockEventsOnDrag)
- return FALSE;
-
- bool ret = FALSE;
-
- if ((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab))
- {
- wxNavigationKeyEvent new_event;
- /* GDK reports GDK_ISO_Left_Tab for SHIFT-TAB */
- new_event.SetDirection( (gdk_event->keyval == GDK_Tab) );
- /* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
- new_event.SetWindowChange( (gdk_event->state & GDK_CONTROL_MASK) );
- new_event.SetCurrentFocus( listbox );
- ret = listbox->GetEventHandler()->ProcessEvent( new_event );
- }
-
- if ((gdk_event->keyval == GDK_Return) && (!ret))
- {
- // eat return in all modes
- ret = TRUE;
- }
-
-#if wxUSE_CHECKLISTBOX
- if ((gdk_event->keyval == ' ') && (listbox->m_hasCheckBoxes) && (!ret))
- {
- int sel = listbox->GtkGetIndex( widget );
-
- wxCheckListBox *clb = (wxCheckListBox *)listbox;
-
- clb->Check( sel, !clb->IsChecked(sel) );
-
- wxCommandEvent new_event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, listbox->GetId() );
- new_event.SetEventObject( listbox );
- new_event.SetInt( sel );
- ret = listbox->GetEventHandler()->ProcessEvent( new_event );
- }
-#endif // wxUSE_CHECKLISTBOX
-
- // Check or uncheck item with SPACE
- if ((gdk_event->keyval == ' ') && (!ret) &&
- (((listbox->GetWindowStyleFlag() & wxLB_MULTIPLE) != 0) ||
- ((listbox->GetWindowStyleFlag() & wxLB_EXTENDED) != 0)) )