From: Vadim Zeitlin Date: Wed, 21 Mar 2001 23:55:35 +0000 (+0000) Subject: merged Ctrl-Space fix from 2.2 branch X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d8408fc65fccc866fbe5ce2a6acefa26385da8d8 merged Ctrl-Space fix from 2.2 branch git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 2180a54210..d8d0f17a59 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1489,10 +1489,13 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); - // or activate the selected item if any - if ( lItem != -1 && (wVKey == VK_RETURN || wVKey == VK_SPACE) ) + // or activate the selected item if any (but + // not with Shift and/or Ctrl as then they have a predefined + // meaning for the list view) + if ( lItem != -1 && + (wVKey == VK_RETURN || wVKey == VK_SPACE) && + !(wxIsShiftDown() || wxIsCtrlDown()) ) { - // TODO this behaviour probably should be optional eventType = wxEVT_COMMAND_LIST_ITEM_ACTIVATED; event.m_itemIndex = lItem; }