]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/menu.cpp
wxMotif compilation fixes for wxDataObject and PROCESS_EVENTS (wxSocket)
[wxWidgets.git] / src / msw / menu.cpp
index 626d99902f7bf6619bbd7d3c4f878621a46b2287..4cca3f9e59dddbd787223bfa0c5b9c887391200b 100644 (file)
@@ -178,7 +178,7 @@ void wxMenu::Append(wxMenuItem *pItem)
                 keyCode = wxToupper(current[0U]);
             }
             else {
-                // it should be a function key
+                // is it a function key?
                 if ( current[0U] == 'f' && isdigit(current[1U]) &&
                      (current.Len() == 2 ||
                      (current.Len() == 3 && isdigit(current[2U]))) ) {
@@ -188,8 +188,21 @@ void wxMenu::Append(wxMenuItem *pItem)
                     keyCode = VK_F1 + n - 1;
                 }
                 else {
-                    wxLogDebug(wxT("Unrecognized accel key '%s', accel "
-                                  "string ignored."), current.c_str());
+                    // several special cases
+                    current.MakeUpper();
+                    if ( current == wxT("DEL") ) {
+                        keyCode = VK_DELETE;
+                    }
+                    else if ( current == wxT("PGUP") ) {
+                        keyCode = VK_PRIOR;
+                    }
+                    else if ( current == wxT("PGDN") ) {
+                        keyCode = VK_NEXT;
+                    }
+                    else {
+                        wxLogDebug(wxT("Unrecognized accel key '%s', accel "
+                                       "string ignored."), current.c_str());
+                    }
                 }
             }
         }