From 395e0a70bad49a83c9c8eb7626b1e3dd2e5f10c5 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 1 Jan 2007 20:48:51 +0000 Subject: [PATCH] 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 --- src/msw/listctrl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 6f3a70e136..9870353bca 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -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; } }