Don't steal VK_RETURN for wxEVT_COMMAND_LIST_ITEM_ACTIVATED if any of

the modifier keys is pressed.  This let's RETURN+Modifier be used as
a normal accelerator key when the list ctrl has the focus.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2007-01-01 20:48:51 +00:00
parent aeffa0721d
commit 395e0a70ba

View File

@ -1737,7 +1737,11 @@ bool wxListCtrl::MSWShouldPreProcessMessage(WXMSG* msg)
{
if ( msg->wParam == VK_RETURN )
{
// we need VK_RETURN to generate wxEVT_COMMAND_LIST_ITEM_ACTIVATED
// We need VK_RETURN to generate wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
// but only if none of the modifiers is down. We'll let normal
// accelerators handle those.
if ( !wxIsCtrlDown() && !wxIsCtrlDown() &&
!((HIWORD(msg->lParam) & KF_ALTDOWN) == KF_ALTDOWN))
return false;
}
}