From 5bd24f724209014da8889d1b225294777f5f856a Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 24 Mar 2006 04:14:29 +0000 Subject: [PATCH] Make WXK*PRIOR and WXK*NEXT be aliases for WXK*PAGEUP and WXK*PAGEDOWN git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/stc/ScintillaWX.cpp | 8 ++++---- include/wx/defs.h | 8 ++++---- src/generic/scrlwing.cpp | 2 -- src/generic/vlbox.cpp | 2 -- src/gtk/menu.cpp | 14 ++++++-------- src/stc/ScintillaWX.cpp | 8 ++++---- wxPython/demo/KeyEvents.py | 8 ++++---- 7 files changed, 22 insertions(+), 28 deletions(-) diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index c9394b9766..2a39569a98 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -907,10 +907,10 @@ int ScintillaWX::DoKeyDown(const wxKeyEvent& evt, bool* consumed) case WXK_RIGHT: key = SCK_RIGHT; break; case WXK_HOME: key = SCK_HOME; break; case WXK_END: key = SCK_END; break; - case WXK_PAGEUP: // fall through - case WXK_PRIOR: key = SCK_PRIOR; break; - case WXK_PAGEDOWN: // fall through - case WXK_NEXT: key = SCK_NEXT; break; + case WXK_PAGEUP: key = SCK_PRIOR; break; + case WXK_PAGEDOWN: key = SCK_NEXT; break; + case WXK_NUMPAD_PAGEUP: key = SCK_PRIOR; break; + case WXK_NUMPAD_PAGEDOWN: key = SCK_NEXT; break; case WXK_DELETE: key = SCK_DELETE; break; case WXK_INSERT: key = SCK_INSERT; break; case WXK_ESCAPE: key = SCK_ESCAPE; break; diff --git a/include/wx/defs.h b/include/wx/defs.h index b29297df86..caf20f5a38 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -2084,8 +2084,6 @@ enum wxKeyCode WXK_MENU, WXK_PAUSE, WXK_CAPITAL, - WXK_PRIOR, /* Page up */ - WXK_NEXT, /* Page down */ WXK_END, WXK_HOME, WXK_LEFT, @@ -2142,6 +2140,8 @@ enum wxKeyCode WXK_SCROLL, WXK_PAGEUP, WXK_PAGEDOWN, + WXK_PRIOR = WXK_PAGEUP, + WXK_NEXT = WXK_PAGEDOWN, WXK_NUMPAD_SPACE, WXK_NUMPAD_TAB, @@ -2155,10 +2155,10 @@ enum wxKeyCode WXK_NUMPAD_UP, WXK_NUMPAD_RIGHT, WXK_NUMPAD_DOWN, - WXK_NUMPAD_PRIOR, WXK_NUMPAD_PAGEUP, - WXK_NUMPAD_NEXT, WXK_NUMPAD_PAGEDOWN, + WXK_NUMPAD_PRIOR = WXK_NUMPAD_PAGEUP, + WXK_NUMPAD_NEXT = WXK_NUMPAD_PAGEDOWN, WXK_NUMPAD_END, WXK_NUMPAD_BEGIN, WXK_NUMPAD_INSERT, diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index 7a684f0ac2..d6ace0914c 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -1084,13 +1084,11 @@ void wxScrollHelper::HandleOnChar(wxKeyEvent& event) switch ( event.GetKeyCode() ) { case WXK_PAGEUP: - case WXK_PRIOR: dsty = sty - (5 * cliy / 6); Scroll(-1, (dsty == -1) ? 0 : dsty); break; case WXK_PAGEDOWN: - case WXK_NEXT: Scroll(-1, sty + (5 * cliy / 6)); break; diff --git a/src/generic/vlbox.cpp b/src/generic/vlbox.cpp index 1c1f33174e..d2e6964fdd 100644 --- a/src/generic/vlbox.cpp +++ b/src/generic/vlbox.cpp @@ -538,13 +538,11 @@ void wxVListBox::OnKeyDown(wxKeyEvent& event) break; case WXK_PAGEDOWN: - case WXK_NEXT: PageDown(); current = GetFirstVisibleLine(); break; case WXK_PAGEUP: - case WXK_PRIOR: if ( m_current == (int)GetFirstVisibleLine() ) { PageUp(); diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 470e3b87ba..08dae1a867 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -1196,12 +1196,10 @@ static wxString GetGtkHotKey( const wxMenuItem& item ) hotkey << wxT("Down" ); break; case WXK_PAGEUP: - case WXK_PRIOR: - hotkey << wxT("Prior" ); + hotkey << wxT("PgUp" ); break; case WXK_PAGEDOWN: - case WXK_NEXT: - hotkey << wxT("Next" ); + hotkey << wxT("PgDn" ); break; case WXK_LEFT: hotkey << wxT("Left" ); @@ -1318,11 +1316,11 @@ static wxString GetGtkHotKey( const wxMenuItem& item ) case WXK_NUMPAD_DOWN: hotkey << wxT("KP_Down" ); break; - case WXK_NUMPAD_PRIOR: case WXK_NUMPAD_PAGEUP: - hotkey << wxT("KP_Prior" ); + case WXK_NUMPAD_PAGEUP: + hotkey << wxT("KP_PgUp" ); break; - case WXK_NUMPAD_NEXT: case WXK_NUMPAD_PAGEDOWN: - hotkey << wxT("KP_Next" ); + case WXK_NUMPAD_PAGEDOWN: + hotkey << wxT("KP_PgDn" ); break; case WXK_NUMPAD_END: hotkey << wxT("KP_End" ); diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index c9394b9766..2a39569a98 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -907,10 +907,10 @@ int ScintillaWX::DoKeyDown(const wxKeyEvent& evt, bool* consumed) case WXK_RIGHT: key = SCK_RIGHT; break; case WXK_HOME: key = SCK_HOME; break; case WXK_END: key = SCK_END; break; - case WXK_PAGEUP: // fall through - case WXK_PRIOR: key = SCK_PRIOR; break; - case WXK_PAGEDOWN: // fall through - case WXK_NEXT: key = SCK_NEXT; break; + case WXK_PAGEUP: key = SCK_PRIOR; break; + case WXK_PAGEDOWN: key = SCK_NEXT; break; + case WXK_NUMPAD_PAGEUP: key = SCK_PRIOR; break; + case WXK_NUMPAD_PAGEDOWN: key = SCK_NEXT; break; case WXK_DELETE: key = SCK_DELETE; break; case WXK_INSERT: key = SCK_INSERT; break; case WXK_ESCAPE: key = SCK_ESCAPE; break; diff --git a/wxPython/demo/KeyEvents.py b/wxPython/demo/KeyEvents.py index 1b55200099..b0ef7589c3 100644 --- a/wxPython/demo/KeyEvents.py +++ b/wxPython/demo/KeyEvents.py @@ -23,8 +23,8 @@ keyMap = { wx.WXK_MENU : "WXK_MENU", wx.WXK_PAUSE : "WXK_PAUSE", wx.WXK_CAPITAL : "WXK_CAPITAL", - wx.WXK_PRIOR : "WXK_PRIOR", - wx.WXK_NEXT : "WXK_NEXT", + #wx.WXK_PRIOR : "WXK_PRIOR", + #wx.WXK_NEXT : "WXK_NEXT", wx.WXK_END : "WXK_END", wx.WXK_HOME : "WXK_HOME", wx.WXK_LEFT : "WXK_LEFT", @@ -93,9 +93,9 @@ keyMap = { wx.WXK_NUMPAD_UP : "WXK_NUMPAD_UP", wx.WXK_NUMPAD_RIGHT : "WXK_NUMPAD_RIGHT", wx.WXK_NUMPAD_DOWN : "WXK_NUMPAD_DOWN", - wx.WXK_NUMPAD_PRIOR : "WXK_NUMPAD_PRIOR", + #wx.WXK_NUMPAD_PRIOR : "WXK_NUMPAD_PRIOR", wx.WXK_NUMPAD_PAGEUP : "WXK_NUMPAD_PAGEUP", - wx.WXK_NUMPAD_NEXT : "WXK_NUMPAD_NEXT", + #wx.WXK_NUMPAD_NEXT : "WXK_NUMPAD_NEXT", wx.WXK_NUMPAD_PAGEDOWN : "WXK_NUMPAD_PAGEDOWN", wx.WXK_NUMPAD_END : "WXK_NUMPAD_END", wx.WXK_NUMPAD_BEGIN : "WXK_NUMPAD_BEGIN", -- 2.45.2