Use "new" GDK keysym names
Old names are no longer available with GTK+4
This commit is contained in:
@@ -526,6 +526,113 @@ static inline void wx_gtk_widget_get_preferred_size(GtkWidget* widget, GtkRequis
|
||||
}
|
||||
#define gtk_widget_get_preferred_size wx_gtk_widget_get_preferred_size
|
||||
|
||||
#if defined(GDK_Alt_L) && !defined(GDK_KEY_Alt_L)
|
||||
#define GDK_KEY_Alt_L GDK_Alt_L
|
||||
#define GDK_KEY_Alt_R GDK_Alt_R
|
||||
#define GDK_KEY_AudioLowerVolume GDK_AudioLowerVolume
|
||||
#define GDK_KEY_AudioMute GDK_AudioMute
|
||||
#define GDK_KEY_AudioNext GDK_AudioNext
|
||||
#define GDK_KEY_AudioPlay GDK_AudioPlay
|
||||
#define GDK_KEY_AudioPrev GDK_AudioPrev
|
||||
#define GDK_KEY_AudioRaiseVolume GDK_AudioRaiseVolume
|
||||
#define GDK_KEY_AudioStop GDK_AudioStop
|
||||
#define GDK_KEY_Back GDK_Back
|
||||
#define GDK_KEY_BackSpace GDK_BackSpace
|
||||
#define GDK_KEY_Begin GDK_Begin
|
||||
#define GDK_KEY_Caps_Lock GDK_Caps_Lock
|
||||
#define GDK_KEY_Clear GDK_Clear
|
||||
#define GDK_KEY_Control_L GDK_Control_L
|
||||
#define GDK_KEY_Control_R GDK_Control_R
|
||||
#define GDK_KEY_Delete GDK_Delete
|
||||
#define GDK_KEY_Down GDK_Down
|
||||
#define GDK_KEY_End GDK_End
|
||||
#define GDK_KEY_Escape GDK_Escape
|
||||
#define GDK_KEY_Execute GDK_Execute
|
||||
#define GDK_KEY_F10 GDK_F10
|
||||
#define GDK_KEY_F11 GDK_F11
|
||||
#define GDK_KEY_F12 GDK_F12
|
||||
#define GDK_KEY_F1 GDK_F1
|
||||
#define GDK_KEY_F2 GDK_F2
|
||||
#define GDK_KEY_F3 GDK_F3
|
||||
#define GDK_KEY_F4 GDK_F4
|
||||
#define GDK_KEY_F5 GDK_F5
|
||||
#define GDK_KEY_F6 GDK_F6
|
||||
#define GDK_KEY_F7 GDK_F7
|
||||
#define GDK_KEY_F8 GDK_F8
|
||||
#define GDK_KEY_F9 GDK_F9
|
||||
#define GDK_KEY_Favorites GDK_Favorites
|
||||
#define GDK_KEY_Forward GDK_Forward
|
||||
#define GDK_KEY_Help GDK_Help
|
||||
#define GDK_KEY_Home GDK_Home
|
||||
#define GDK_KEY_HomePage GDK_HomePage
|
||||
#define GDK_KEY_Insert GDK_Insert
|
||||
#define GDK_KEY_ISO_Enter GDK_ISO_Enter
|
||||
#define GDK_KEY_ISO_Left_Tab GDK_ISO_Left_Tab
|
||||
#define GDK_KEY_KP_0 GDK_KP_0
|
||||
#define GDK_KEY_KP_1 GDK_KP_1
|
||||
#define GDK_KEY_KP_2 GDK_KP_2
|
||||
#define GDK_KEY_KP_3 GDK_KP_3
|
||||
#define GDK_KEY_KP_4 GDK_KP_4
|
||||
#define GDK_KEY_KP_5 GDK_KP_5
|
||||
#define GDK_KEY_KP_6 GDK_KP_6
|
||||
#define GDK_KEY_KP_7 GDK_KP_7
|
||||
#define GDK_KEY_KP_8 GDK_KP_8
|
||||
#define GDK_KEY_KP_9 GDK_KP_9
|
||||
#define GDK_KEY_KP_Add GDK_KP_Add
|
||||
#define GDK_KEY_KP_Begin GDK_KP_Begin
|
||||
#define GDK_KEY_KP_Decimal GDK_KP_Decimal
|
||||
#define GDK_KEY_KP_Delete GDK_KP_Delete
|
||||
#define GDK_KEY_KP_Divide GDK_KP_Divide
|
||||
#define GDK_KEY_KP_Down GDK_KP_Down
|
||||
#define GDK_KEY_KP_End GDK_KP_End
|
||||
#define GDK_KEY_KP_Enter GDK_KP_Enter
|
||||
#define GDK_KEY_KP_Equal GDK_KP_Equal
|
||||
#define GDK_KEY_KP_F1 GDK_KP_F1
|
||||
#define GDK_KEY_KP_F2 GDK_KP_F2
|
||||
#define GDK_KEY_KP_F3 GDK_KP_F3
|
||||
#define GDK_KEY_KP_F4 GDK_KP_F4
|
||||
#define GDK_KEY_KP_Home GDK_KP_Home
|
||||
#define GDK_KEY_KP_Insert GDK_KP_Insert
|
||||
#define GDK_KEY_KP_Left GDK_KP_Left
|
||||
#define GDK_KEY_KP_Multiply GDK_KP_Multiply
|
||||
#define GDK_KEY_KP_Next GDK_KP_Next
|
||||
#define GDK_KEY_KP_Prior GDK_KP_Prior
|
||||
#define GDK_KEY_KP_Right GDK_KP_Right
|
||||
#define GDK_KEY_KP_Separator GDK_KP_Separator
|
||||
#define GDK_KEY_KP_Space GDK_KP_Space
|
||||
#define GDK_KEY_KP_Subtract GDK_KP_Subtract
|
||||
#define GDK_KEY_KP_Tab GDK_KP_Tab
|
||||
#define GDK_KEY_KP_Up GDK_KP_Up
|
||||
#define GDK_KEY_LaunchA GDK_LaunchA
|
||||
#define GDK_KEY_LaunchB GDK_LaunchB
|
||||
#define GDK_KEY_Left GDK_Left
|
||||
#define GDK_KEY_Linefeed GDK_Linefeed
|
||||
#define GDK_KEY_Mail GDK_Mail
|
||||
#define GDK_KEY_Menu GDK_Menu
|
||||
#define GDK_KEY_Meta_L GDK_Meta_L
|
||||
#define GDK_KEY_Meta_R GDK_Meta_R
|
||||
#define GDK_KEY_Next GDK_Next
|
||||
#define GDK_KEY_Num_Lock GDK_Num_Lock
|
||||
#define GDK_KEY_Page_Down GDK_Page_Down
|
||||
#define GDK_KEY_Page_Up GDK_Page_Up
|
||||
#define GDK_KEY_Pause GDK_Pause
|
||||
#define GDK_KEY_Print GDK_Print
|
||||
#define GDK_KEY_Prior GDK_Prior
|
||||
#define GDK_KEY_Refresh GDK_Refresh
|
||||
#define GDK_KEY_Return GDK_Return
|
||||
#define GDK_KEY_Right GDK_Right
|
||||
#define GDK_KEY_Scroll_Lock GDK_Scroll_Lock
|
||||
#define GDK_KEY_Search GDK_Search
|
||||
#define GDK_KEY_Select GDK_Select
|
||||
#define GDK_KEY_Shift_L GDK_Shift_L
|
||||
#define GDK_KEY_Shift_R GDK_Shift_R
|
||||
#define GDK_KEY_Stop GDK_Stop
|
||||
#define GDK_KEY_Super_L GDK_Super_L
|
||||
#define GDK_KEY_Super_R GDK_Super_R
|
||||
#define GDK_KEY_Tab GDK_Tab
|
||||
#define GDK_KEY_Up GDK_Up
|
||||
#endif
|
||||
|
||||
// There is no equivalent in GTK+ 2, but it's not needed there anyhow as the
|
||||
// backend is determined at compile time in that version.
|
||||
#define GDK_IS_X11_DISPLAY(dpy) true
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include "wx/gtk/private.h"
|
||||
#include "wx/gtk/private/eventsdisabler.h"
|
||||
#include "wx/gtk/private/gtk2-compat.h"
|
||||
@@ -36,11 +37,6 @@
|
||||
#include "wx/gtk/private/treeentry_gtk.h"
|
||||
#include "wx/gtk/private/treeview.h"
|
||||
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#ifdef __WXGTK3__
|
||||
#include <gdk/gdkkeysyms-compat.h>
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// data
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -133,9 +129,9 @@ gtk_listbox_key_press_callback( GtkWidget *WXUNUSED(widget),
|
||||
GdkEventKey *gdk_event,
|
||||
wxListBox *listbox )
|
||||
{
|
||||
if ((gdk_event->keyval == GDK_Return) ||
|
||||
(gdk_event->keyval == GDK_ISO_Enter) ||
|
||||
(gdk_event->keyval == GDK_KP_Enter))
|
||||
if ((gdk_event->keyval == GDK_KEY_Return) ||
|
||||
(gdk_event->keyval == GDK_KEY_ISO_Enter) ||
|
||||
(gdk_event->keyval == GDK_KEY_KP_Enter))
|
||||
{
|
||||
int index = -1;
|
||||
if (!listbox->HasMultipleSelection())
|
||||
|
@@ -18,14 +18,10 @@
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include "wx/gtk/private.h"
|
||||
#include "wx/gtk/private/gtk2-compat.h"
|
||||
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
#include <gdk/gdkkeysyms-compat.h>
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxGTKRadioButtonInfo
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -78,24 +74,24 @@ static gint gtk_radiobox_keypress_callback( GtkWidget *widget, GdkEventKey *gdk_
|
||||
{
|
||||
if (g_blockEventsOnDrag) return FALSE;
|
||||
|
||||
if ( ((gdk_event->keyval == GDK_Tab) ||
|
||||
(gdk_event->keyval == GDK_ISO_Left_Tab)) &&
|
||||
if ( ((gdk_event->keyval == GDK_KEY_Tab) ||
|
||||
(gdk_event->keyval == GDK_KEY_ISO_Left_Tab)) &&
|
||||
rb->GetParent() && (rb->GetParent()->HasFlag( wxTAB_TRAVERSAL)) )
|
||||
{
|
||||
wxNavigationKeyEvent new_event;
|
||||
new_event.SetEventObject( rb->GetParent() );
|
||||
// GDK reports GDK_ISO_Left_Tab for SHIFT-TAB
|
||||
new_event.SetDirection( (gdk_event->keyval == GDK_Tab) );
|
||||
new_event.SetDirection( (gdk_event->keyval == GDK_KEY_Tab) );
|
||||
// CTRL-TAB changes the (parent) window, i.e. switch notebook page
|
||||
new_event.SetWindowChange( (gdk_event->state & GDK_CONTROL_MASK) != 0 );
|
||||
new_event.SetCurrentFocus( rb );
|
||||
return rb->GetParent()->HandleWindowEvent(new_event);
|
||||
}
|
||||
|
||||
if ((gdk_event->keyval != GDK_Up) &&
|
||||
(gdk_event->keyval != GDK_Down) &&
|
||||
(gdk_event->keyval != GDK_Left) &&
|
||||
(gdk_event->keyval != GDK_Right))
|
||||
if ((gdk_event->keyval != GDK_KEY_Up) &&
|
||||
(gdk_event->keyval != GDK_KEY_Down) &&
|
||||
(gdk_event->keyval != GDK_KEY_Left) &&
|
||||
(gdk_event->keyval != GDK_KEY_Right))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -110,8 +106,8 @@ static gint gtk_radiobox_keypress_callback( GtkWidget *widget, GdkEventKey *gdk_
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ((gdk_event->keyval == GDK_Up) ||
|
||||
(gdk_event->keyval == GDK_Left))
|
||||
if ((gdk_event->keyval == GDK_KEY_Up) ||
|
||||
(gdk_event->keyval == GDK_KEY_Left))
|
||||
{
|
||||
if (node == rb->m_buttonsInfo.GetFirst())
|
||||
node = rb->m_buttonsInfo.GetLast();
|
||||
|
@@ -38,6 +38,7 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include "wx/gtk/private.h"
|
||||
#include "wx/gtk/private/gtk2-compat.h"
|
||||
#include "wx/gtk/private/event.h"
|
||||
@@ -52,11 +53,6 @@ using namespace wxGTKImpl;
|
||||
typedef guint KeySym;
|
||||
#endif
|
||||
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#ifdef __WXGTK3__
|
||||
#include <gdk/gdkkeysyms-compat.h>
|
||||
#endif
|
||||
|
||||
// gdk_window_set_composited() is only supported since 2.12
|
||||
#define wxGTK_HAS_COMPOSITING_SUPPORT (GTK_CHECK_VERSION(2,12,0) && wxUSE_CAIRO)
|
||||
|
||||
@@ -558,311 +554,311 @@ static long wxTranslateKeySymToWXKey(KeySym keysym, bool isChar)
|
||||
switch ( keysym )
|
||||
{
|
||||
// Shift, Control and Alt don't generate the CHAR events at all
|
||||
case GDK_Shift_L:
|
||||
case GDK_Shift_R:
|
||||
case GDK_KEY_Shift_L:
|
||||
case GDK_KEY_Shift_R:
|
||||
key_code = isChar ? 0 : WXK_SHIFT;
|
||||
break;
|
||||
case GDK_Control_L:
|
||||
case GDK_Control_R:
|
||||
case GDK_KEY_Control_L:
|
||||
case GDK_KEY_Control_R:
|
||||
key_code = isChar ? 0 : WXK_CONTROL;
|
||||
break;
|
||||
case GDK_Meta_L:
|
||||
case GDK_Meta_R:
|
||||
case GDK_Alt_L:
|
||||
case GDK_Alt_R:
|
||||
case GDK_Super_L:
|
||||
case GDK_Super_R:
|
||||
case GDK_KEY_Meta_L:
|
||||
case GDK_KEY_Meta_R:
|
||||
case GDK_KEY_Alt_L:
|
||||
case GDK_KEY_Alt_R:
|
||||
case GDK_KEY_Super_L:
|
||||
case GDK_KEY_Super_R:
|
||||
key_code = isChar ? 0 : WXK_ALT;
|
||||
break;
|
||||
|
||||
// neither do the toggle modifies
|
||||
case GDK_Scroll_Lock:
|
||||
case GDK_KEY_Scroll_Lock:
|
||||
key_code = isChar ? 0 : WXK_SCROLL;
|
||||
break;
|
||||
|
||||
case GDK_Caps_Lock:
|
||||
case GDK_KEY_Caps_Lock:
|
||||
key_code = isChar ? 0 : WXK_CAPITAL;
|
||||
break;
|
||||
|
||||
case GDK_Num_Lock:
|
||||
case GDK_KEY_Num_Lock:
|
||||
key_code = isChar ? 0 : WXK_NUMLOCK;
|
||||
break;
|
||||
|
||||
|
||||
// various other special keys
|
||||
case GDK_Menu:
|
||||
case GDK_KEY_Menu:
|
||||
key_code = WXK_MENU;
|
||||
break;
|
||||
|
||||
case GDK_Help:
|
||||
case GDK_KEY_Help:
|
||||
key_code = WXK_HELP;
|
||||
break;
|
||||
|
||||
case GDK_BackSpace:
|
||||
case GDK_KEY_BackSpace:
|
||||
key_code = WXK_BACK;
|
||||
break;
|
||||
|
||||
case GDK_ISO_Left_Tab:
|
||||
case GDK_Tab:
|
||||
case GDK_KEY_ISO_Left_Tab:
|
||||
case GDK_KEY_Tab:
|
||||
key_code = WXK_TAB;
|
||||
break;
|
||||
|
||||
case GDK_Linefeed:
|
||||
case GDK_Return:
|
||||
case GDK_KEY_Linefeed:
|
||||
case GDK_KEY_Return:
|
||||
key_code = WXK_RETURN;
|
||||
break;
|
||||
|
||||
case GDK_Clear:
|
||||
case GDK_KEY_Clear:
|
||||
key_code = WXK_CLEAR;
|
||||
break;
|
||||
|
||||
case GDK_Pause:
|
||||
case GDK_KEY_Pause:
|
||||
key_code = WXK_PAUSE;
|
||||
break;
|
||||
|
||||
case GDK_Select:
|
||||
case GDK_KEY_Select:
|
||||
key_code = WXK_SELECT;
|
||||
break;
|
||||
|
||||
case GDK_Print:
|
||||
case GDK_KEY_Print:
|
||||
key_code = WXK_PRINT;
|
||||
break;
|
||||
|
||||
case GDK_Execute:
|
||||
case GDK_KEY_Execute:
|
||||
key_code = WXK_EXECUTE;
|
||||
break;
|
||||
|
||||
case GDK_Escape:
|
||||
case GDK_KEY_Escape:
|
||||
key_code = WXK_ESCAPE;
|
||||
break;
|
||||
|
||||
// cursor and other extended keyboard keys
|
||||
case GDK_Delete:
|
||||
case GDK_KEY_Delete:
|
||||
key_code = WXK_DELETE;
|
||||
break;
|
||||
|
||||
case GDK_Home:
|
||||
case GDK_KEY_Home:
|
||||
key_code = WXK_HOME;
|
||||
break;
|
||||
|
||||
case GDK_Left:
|
||||
case GDK_KEY_Left:
|
||||
key_code = WXK_LEFT;
|
||||
break;
|
||||
|
||||
case GDK_Up:
|
||||
case GDK_KEY_Up:
|
||||
key_code = WXK_UP;
|
||||
break;
|
||||
|
||||
case GDK_Right:
|
||||
case GDK_KEY_Right:
|
||||
key_code = WXK_RIGHT;
|
||||
break;
|
||||
|
||||
case GDK_Down:
|
||||
case GDK_KEY_Down:
|
||||
key_code = WXK_DOWN;
|
||||
break;
|
||||
|
||||
case GDK_Prior: // == GDK_Page_Up
|
||||
case GDK_KEY_Prior: // == GDK_KEY_Page_Up
|
||||
key_code = WXK_PAGEUP;
|
||||
break;
|
||||
|
||||
case GDK_Next: // == GDK_Page_Down
|
||||
case GDK_KEY_Next: // == GDK_KEY_Page_Down
|
||||
key_code = WXK_PAGEDOWN;
|
||||
break;
|
||||
|
||||
case GDK_End:
|
||||
case GDK_KEY_End:
|
||||
key_code = WXK_END;
|
||||
break;
|
||||
|
||||
case GDK_Begin:
|
||||
case GDK_KEY_Begin:
|
||||
key_code = WXK_HOME;
|
||||
break;
|
||||
|
||||
case GDK_Insert:
|
||||
case GDK_KEY_Insert:
|
||||
key_code = WXK_INSERT;
|
||||
break;
|
||||
|
||||
|
||||
// numpad keys
|
||||
case GDK_KP_0:
|
||||
case GDK_KP_1:
|
||||
case GDK_KP_2:
|
||||
case GDK_KP_3:
|
||||
case GDK_KP_4:
|
||||
case GDK_KP_5:
|
||||
case GDK_KP_6:
|
||||
case GDK_KP_7:
|
||||
case GDK_KP_8:
|
||||
case GDK_KP_9:
|
||||
key_code = (isChar ? '0' : int(WXK_NUMPAD0)) + keysym - GDK_KP_0;
|
||||
case GDK_KEY_KP_0:
|
||||
case GDK_KEY_KP_1:
|
||||
case GDK_KEY_KP_2:
|
||||
case GDK_KEY_KP_3:
|
||||
case GDK_KEY_KP_4:
|
||||
case GDK_KEY_KP_5:
|
||||
case GDK_KEY_KP_6:
|
||||
case GDK_KEY_KP_7:
|
||||
case GDK_KEY_KP_8:
|
||||
case GDK_KEY_KP_9:
|
||||
key_code = (isChar ? '0' : int(WXK_NUMPAD0)) + keysym - GDK_KEY_KP_0;
|
||||
break;
|
||||
|
||||
case GDK_KP_Space:
|
||||
case GDK_KEY_KP_Space:
|
||||
key_code = isChar ? ' ' : int(WXK_NUMPAD_SPACE);
|
||||
break;
|
||||
|
||||
case GDK_KP_Tab:
|
||||
case GDK_KEY_KP_Tab:
|
||||
key_code = isChar ? WXK_TAB : WXK_NUMPAD_TAB;
|
||||
break;
|
||||
|
||||
case GDK_KP_Enter:
|
||||
case GDK_KEY_KP_Enter:
|
||||
key_code = isChar ? WXK_RETURN : WXK_NUMPAD_ENTER;
|
||||
break;
|
||||
|
||||
case GDK_KP_F1:
|
||||
case GDK_KEY_KP_F1:
|
||||
key_code = isChar ? WXK_F1 : WXK_NUMPAD_F1;
|
||||
break;
|
||||
|
||||
case GDK_KP_F2:
|
||||
case GDK_KEY_KP_F2:
|
||||
key_code = isChar ? WXK_F2 : WXK_NUMPAD_F2;
|
||||
break;
|
||||
|
||||
case GDK_KP_F3:
|
||||
case GDK_KEY_KP_F3:
|
||||
key_code = isChar ? WXK_F3 : WXK_NUMPAD_F3;
|
||||
break;
|
||||
|
||||
case GDK_KP_F4:
|
||||
case GDK_KEY_KP_F4:
|
||||
key_code = isChar ? WXK_F4 : WXK_NUMPAD_F4;
|
||||
break;
|
||||
|
||||
case GDK_KP_Home:
|
||||
case GDK_KEY_KP_Home:
|
||||
key_code = isChar ? WXK_HOME : WXK_NUMPAD_HOME;
|
||||
break;
|
||||
|
||||
case GDK_KP_Left:
|
||||
case GDK_KEY_KP_Left:
|
||||
key_code = isChar ? WXK_LEFT : WXK_NUMPAD_LEFT;
|
||||
break;
|
||||
|
||||
case GDK_KP_Up:
|
||||
case GDK_KEY_KP_Up:
|
||||
key_code = isChar ? WXK_UP : WXK_NUMPAD_UP;
|
||||
break;
|
||||
|
||||
case GDK_KP_Right:
|
||||
case GDK_KEY_KP_Right:
|
||||
key_code = isChar ? WXK_RIGHT : WXK_NUMPAD_RIGHT;
|
||||
break;
|
||||
|
||||
case GDK_KP_Down:
|
||||
case GDK_KEY_KP_Down:
|
||||
key_code = isChar ? WXK_DOWN : WXK_NUMPAD_DOWN;
|
||||
break;
|
||||
|
||||
case GDK_KP_Prior: // == GDK_KP_Page_Up
|
||||
case GDK_KEY_KP_Prior: // == GDK_KP_Page_Up
|
||||
key_code = isChar ? WXK_PAGEUP : WXK_NUMPAD_PAGEUP;
|
||||
break;
|
||||
|
||||
case GDK_KP_Next: // == GDK_KP_Page_Down
|
||||
case GDK_KEY_KP_Next: // == GDK_KP_Page_Down
|
||||
key_code = isChar ? WXK_PAGEDOWN : WXK_NUMPAD_PAGEDOWN;
|
||||
break;
|
||||
|
||||
case GDK_KP_End:
|
||||
case GDK_KEY_KP_End:
|
||||
key_code = isChar ? WXK_END : WXK_NUMPAD_END;
|
||||
break;
|
||||
|
||||
case GDK_KP_Begin:
|
||||
case GDK_KEY_KP_Begin:
|
||||
key_code = isChar ? WXK_HOME : WXK_NUMPAD_BEGIN;
|
||||
break;
|
||||
|
||||
case GDK_KP_Insert:
|
||||
case GDK_KEY_KP_Insert:
|
||||
key_code = isChar ? WXK_INSERT : WXK_NUMPAD_INSERT;
|
||||
break;
|
||||
|
||||
case GDK_KP_Delete:
|
||||
case GDK_KEY_KP_Delete:
|
||||
key_code = isChar ? WXK_DELETE : WXK_NUMPAD_DELETE;
|
||||
break;
|
||||
|
||||
case GDK_KP_Equal:
|
||||
case GDK_KEY_KP_Equal:
|
||||
key_code = isChar ? '=' : int(WXK_NUMPAD_EQUAL);
|
||||
break;
|
||||
|
||||
case GDK_KP_Multiply:
|
||||
case GDK_KEY_KP_Multiply:
|
||||
key_code = isChar ? '*' : int(WXK_NUMPAD_MULTIPLY);
|
||||
break;
|
||||
|
||||
case GDK_KP_Add:
|
||||
case GDK_KEY_KP_Add:
|
||||
key_code = isChar ? '+' : int(WXK_NUMPAD_ADD);
|
||||
break;
|
||||
|
||||
case GDK_KP_Separator:
|
||||
case GDK_KEY_KP_Separator:
|
||||
// FIXME: what is this?
|
||||
key_code = isChar ? '.' : int(WXK_NUMPAD_SEPARATOR);
|
||||
break;
|
||||
|
||||
case GDK_KP_Subtract:
|
||||
case GDK_KEY_KP_Subtract:
|
||||
key_code = isChar ? '-' : int(WXK_NUMPAD_SUBTRACT);
|
||||
break;
|
||||
|
||||
case GDK_KP_Decimal:
|
||||
case GDK_KEY_KP_Decimal:
|
||||
key_code = isChar ? '.' : int(WXK_NUMPAD_DECIMAL);
|
||||
break;
|
||||
|
||||
case GDK_KP_Divide:
|
||||
case GDK_KEY_KP_Divide:
|
||||
key_code = isChar ? '/' : int(WXK_NUMPAD_DIVIDE);
|
||||
break;
|
||||
|
||||
|
||||
// function keys
|
||||
case GDK_F1:
|
||||
case GDK_F2:
|
||||
case GDK_F3:
|
||||
case GDK_F4:
|
||||
case GDK_F5:
|
||||
case GDK_F6:
|
||||
case GDK_F7:
|
||||
case GDK_F8:
|
||||
case GDK_F9:
|
||||
case GDK_F10:
|
||||
case GDK_F11:
|
||||
case GDK_F12:
|
||||
key_code = WXK_F1 + keysym - GDK_F1;
|
||||
case GDK_KEY_F1:
|
||||
case GDK_KEY_F2:
|
||||
case GDK_KEY_F3:
|
||||
case GDK_KEY_F4:
|
||||
case GDK_KEY_F5:
|
||||
case GDK_KEY_F6:
|
||||
case GDK_KEY_F7:
|
||||
case GDK_KEY_F8:
|
||||
case GDK_KEY_F9:
|
||||
case GDK_KEY_F10:
|
||||
case GDK_KEY_F11:
|
||||
case GDK_KEY_F12:
|
||||
key_code = WXK_F1 + keysym - GDK_KEY_F1;
|
||||
break;
|
||||
#if GTK_CHECK_VERSION(2,18,0)
|
||||
case GDK_Back:
|
||||
case GDK_KEY_Back:
|
||||
key_code = WXK_BROWSER_BACK;
|
||||
break;
|
||||
case GDK_Forward:
|
||||
case GDK_KEY_Forward:
|
||||
key_code = WXK_BROWSER_FORWARD;
|
||||
break;
|
||||
case GDK_Refresh:
|
||||
case GDK_KEY_Refresh:
|
||||
key_code = WXK_BROWSER_REFRESH;
|
||||
break;
|
||||
case GDK_Stop:
|
||||
case GDK_KEY_Stop:
|
||||
key_code = WXK_BROWSER_STOP;
|
||||
break;
|
||||
case GDK_Search:
|
||||
case GDK_KEY_Search:
|
||||
key_code = WXK_BROWSER_SEARCH;
|
||||
break;
|
||||
case GDK_Favorites:
|
||||
case GDK_KEY_Favorites:
|
||||
key_code = WXK_BROWSER_FAVORITES;
|
||||
break;
|
||||
case GDK_HomePage:
|
||||
case GDK_KEY_HomePage:
|
||||
key_code = WXK_BROWSER_HOME;
|
||||
break;
|
||||
case GDK_AudioMute:
|
||||
case GDK_KEY_AudioMute:
|
||||
key_code = WXK_VOLUME_MUTE;
|
||||
break;
|
||||
case GDK_AudioLowerVolume:
|
||||
case GDK_KEY_AudioLowerVolume:
|
||||
key_code = WXK_VOLUME_DOWN;
|
||||
break;
|
||||
case GDK_AudioRaiseVolume:
|
||||
case GDK_KEY_AudioRaiseVolume:
|
||||
key_code = WXK_VOLUME_UP;
|
||||
break;
|
||||
case GDK_AudioNext:
|
||||
case GDK_KEY_AudioNext:
|
||||
key_code = WXK_MEDIA_NEXT_TRACK;
|
||||
break;
|
||||
case GDK_AudioPrev:
|
||||
case GDK_KEY_AudioPrev:
|
||||
key_code = WXK_MEDIA_PREV_TRACK;
|
||||
break;
|
||||
case GDK_AudioStop:
|
||||
case GDK_KEY_AudioStop:
|
||||
key_code = WXK_MEDIA_STOP;
|
||||
break;
|
||||
case GDK_AudioPlay:
|
||||
case GDK_KEY_AudioPlay:
|
||||
key_code = WXK_MEDIA_PLAY_PAUSE;
|
||||
break;
|
||||
case GDK_Mail:
|
||||
case GDK_KEY_Mail:
|
||||
key_code = WXK_LAUNCH_MAIL;
|
||||
break;
|
||||
case GDK_LaunchA:
|
||||
case GDK_KEY_LaunchA:
|
||||
key_code = WXK_LAUNCH_APP1;
|
||||
break;
|
||||
case GDK_LaunchB:
|
||||
case GDK_KEY_LaunchB:
|
||||
key_code = WXK_LAUNCH_APP2;
|
||||
break;
|
||||
#endif // GTK_CHECK_VERSION(2,18,0)
|
||||
@@ -920,25 +916,25 @@ static void wxFillOtherKeyEventFields(wxKeyEvent& event,
|
||||
const bool isPress = gdk_event->type == GDK_KEY_PRESS;
|
||||
switch ( gdk_event->keyval )
|
||||
{
|
||||
case GDK_Shift_L:
|
||||
case GDK_Shift_R:
|
||||
case GDK_KEY_Shift_L:
|
||||
case GDK_KEY_Shift_R:
|
||||
event.m_shiftDown = isPress;
|
||||
break;
|
||||
|
||||
case GDK_Control_L:
|
||||
case GDK_Control_R:
|
||||
case GDK_KEY_Control_L:
|
||||
case GDK_KEY_Control_R:
|
||||
event.m_controlDown = isPress;
|
||||
break;
|
||||
|
||||
case GDK_Alt_L:
|
||||
case GDK_Alt_R:
|
||||
case GDK_KEY_Alt_L:
|
||||
case GDK_KEY_Alt_R:
|
||||
event.m_altDown = isPress;
|
||||
break;
|
||||
|
||||
case GDK_Meta_L:
|
||||
case GDK_Meta_R:
|
||||
case GDK_Super_L:
|
||||
case GDK_Super_R:
|
||||
case GDK_KEY_Meta_L:
|
||||
case GDK_KEY_Meta_R:
|
||||
case GDK_KEY_Super_L:
|
||||
case GDK_KEY_Super_R:
|
||||
event.m_metaDown = isPress;
|
||||
break;
|
||||
}
|
||||
@@ -2556,8 +2552,8 @@ void wxWindowGTK::GTKCreateScrolledWindowWith(GtkWidget* view)
|
||||
bindings = gtk_binding_set_by_class(G_OBJECT_GET_CLASS(m_widget));
|
||||
if ( bindings )
|
||||
{
|
||||
gtk_binding_entry_remove(bindings, GDK_Page_Up, GDK_CONTROL_MASK);
|
||||
gtk_binding_entry_remove(bindings, GDK_Page_Down, GDK_CONTROL_MASK);
|
||||
gtk_binding_entry_remove(bindings, GDK_KEY_Page_Up, GDK_CONTROL_MASK);
|
||||
gtk_binding_entry_remove(bindings, GDK_KEY_Page_Down, GDK_CONTROL_MASK);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user