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:
@@ -1737,7 +1737,11 @@ bool wxListCtrl::MSWShouldPreProcessMessage(WXMSG* msg)
|
|||||||
{
|
{
|
||||||
if ( msg->wParam == VK_RETURN )
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user