VK_MENU is WXK_ALT, notWXK_MENU (patch 1119601)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-02-19 15:08:36 +00:00
parent 930fb29eb8
commit f52c3131bf
4 changed files with 6 additions and 7 deletions

View File

@@ -47,10 +47,10 @@ All:
- Changed calculation of scrolling area to not clip away some bits - Changed calculation of scrolling area to not clip away some bits
due to a rounding error. due to a rounding error.
- Changed GetVirtualSize() to return client size by default until - Changed GetVirtualSize() to return client size by default until
SetVirtualSize() gets called. From then on it will only return SetVirtualSize() gets called. From then on it will only return that.
that.
- Various changes to how wxListCtrl and wxTreeCtrl react to right - Various changes to how wxListCtrl and wxTreeCtrl react to right
mouse clicks and left mouse click for starting a drag operation. 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): All (GUI):

View File

@@ -4940,7 +4940,7 @@ int wxCharCodeMSWToWX(int keySym, WXLPARAM lParam)
case VK_CLEAR: id = WXK_CLEAR; break; case VK_CLEAR: id = WXK_CLEAR; break;
case VK_SHIFT: id = WXK_SHIFT; break; case VK_SHIFT: id = WXK_SHIFT; break;
case VK_CONTROL: id = WXK_CONTROL; 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_PAUSE: id = WXK_PAUSE; break;
case VK_CAPITAL: id = WXK_CAPITAL; break; case VK_CAPITAL: id = WXK_CAPITAL; break;
case VK_SPACE: id = WXK_SPACE; 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_SHIFT: keySym = VK_SHIFT; break;
case WXK_CONTROL: keySym = VK_CONTROL; break; case WXK_CONTROL: keySym = VK_CONTROL; break;
case WXK_ALT: keySym = VK_MENU; break; case WXK_ALT: keySym = VK_MENU; break;
case WXK_MENU : keySym = VK_MENU; break;
case WXK_PAUSE: keySym = VK_PAUSE; break; case WXK_PAUSE: keySym = VK_PAUSE; break;
case WXK_CAPITAL: keySym = VK_CAPITAL; break; case WXK_CAPITAL: keySym = VK_CAPITAL; break;
case WXK_PRIOR: keySym = VK_PRIOR; break; case WXK_PRIOR: keySym = VK_PRIOR; break;

View File

@@ -2185,7 +2185,7 @@ void wxMenuBar::OnKeyDown(wxKeyEvent& event)
// the menu when up/down one is // the menu when up/down one is
switch ( key ) switch ( key )
{ {
case WXK_MENU: case WXK_ALT:
// Alt must be processed at wxWindow level too // Alt must be processed at wxWindow level too
event.Skip(); event.Skip();
// fall through // fall through

View File

@@ -1201,7 +1201,7 @@ void wxWindow::OnKeyDown(wxKeyEvent& event)
{ {
#if wxUSE_MENUS #if wxUSE_MENUS
int key = event.GetKeyCode(); 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; ms_winLastAltPress = this;
@@ -1318,7 +1318,7 @@ void wxWindow::OnChar(wxKeyEvent& event)
void wxWindow::OnKeyUp(wxKeyEvent& event) void wxWindow::OnKeyUp(wxKeyEvent& event)
{ {
int key = event.GetKeyCode(); 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 // only process Alt release specially if there were no other key
// presses since Alt had been pressed and if both events happened in // presses since Alt had been pressed and if both events happened in