]> git.saurik.com Git - wxWidgets.git/commitdiff
VK_MENU is WXK_ALT, notWXK_MENU (patch 1119601)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Feb 2005 15:08:36 +0000 (15:08 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Feb 2005 15:08:36 +0000 (15:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/msw/window.cpp
src/univ/menu.cpp
src/univ/winuniv.cpp

index 6011a90ec543dc2bc432f81836247f29a38d14cd..bffd44543c43d103a86ec55ac3baf8e52a4585ac 100644 (file)
@@ -47,10 +47,10 @@ All:
 - Changed calculation of scrolling area to not clip away some bits
   due to a rounding error.
 - Changed GetVirtualSize() to return client size by default until
-  SetVirtualSize() gets called. From then on it will only return
-  that.
+  SetVirtualSize() gets called. From then on it will only return that.
 - Various changes to how wxListCtrl and wxTreeCtrl react to right
   mouse clicks and left mouse click for starting a drag operation.
+- "Alt" key (VK_MENU) now results in WXK_ALT keyboard event, not WXK_MENU
 
 
 All (GUI):
index 31a58a801c1a1e75f4a9ff531c99d93f9669118d..e3beb318c540d313c2298a34a0fc05957f93b54a 100644 (file)
@@ -4940,7 +4940,7 @@ int wxCharCodeMSWToWX(int keySym, WXLPARAM lParam)
         case VK_CLEAR:      id = WXK_CLEAR; break;
         case VK_SHIFT:      id = WXK_SHIFT; break;
         case VK_CONTROL:    id = WXK_CONTROL; break;
-        case VK_MENU :      id = WXK_MENU; break;
+        case VK_MENU :      id = WXK_ALT; break;
         case VK_PAUSE:      id = WXK_PAUSE; break;
         case VK_CAPITAL:    id = WXK_CAPITAL; break;
         case VK_SPACE:      id = WXK_SPACE; break;
@@ -5046,7 +5046,6 @@ WXWORD wxCharCodeWXToMSW(int id, bool *isVirtual)
     case WXK_SHIFT:     keySym = VK_SHIFT; break;
     case WXK_CONTROL:   keySym = VK_CONTROL; break;
     case WXK_ALT:       keySym = VK_MENU; break;
-    case WXK_MENU :     keySym = VK_MENU; break;
     case WXK_PAUSE:     keySym = VK_PAUSE; break;
     case WXK_CAPITAL:   keySym = VK_CAPITAL; break;
     case WXK_PRIOR:     keySym = VK_PRIOR; break;
index b7f2016a858c5c23a2c4a6ea6928a9b70bc3c022..acad3b9451276cb869189fcce037349254d73ecd 100644 (file)
@@ -2185,7 +2185,7 @@ void wxMenuBar::OnKeyDown(wxKeyEvent& event)
     // the menu when up/down one is
     switch ( key )
     {
-        case WXK_MENU:
+        case WXK_ALT:
             // Alt must be processed at wxWindow level too
             event.Skip();
             // fall through
index 2a730a3a9c60cc5162033246ba73198703e7816c..80c245fe450789d63cda4001039137bb666eaa26 100644 (file)
@@ -1201,7 +1201,7 @@ void wxWindow::OnKeyDown(wxKeyEvent& event)
 {
 #if wxUSE_MENUS
     int key = event.GetKeyCode();
-    if ( !event.ControlDown() && (key == WXK_MENU || key == WXK_F10) )
+    if ( !event.ControlDown() && (key == WXK_ALT || key == WXK_F10) )
     {
         ms_winLastAltPress = this;
 
@@ -1318,7 +1318,7 @@ void wxWindow::OnChar(wxKeyEvent& event)
 void wxWindow::OnKeyUp(wxKeyEvent& event)
 {
     int key = event.GetKeyCode();
-    if ( !event.HasModifiers() && (key == WXK_MENU || key == WXK_F10) )
+    if ( !event.HasModifiers() && (key == WXK_ALT || key == WXK_F10) )
     {
         // only process Alt release specially if there were no other key
         // presses since Alt had been pressed and if both events happened in