From 41eb39b4a7c499e8f983460955a0207f90abe148 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 2 Nov 2019 20:34:07 +0100 Subject: [PATCH] Don't activate items on Ctrl-M in generic wxListCtrl This is unexpected, so add the check for the modifiers, as is done in generic wxDataViewCtrl, to only accept the "real" Enter here and not Ctrl-M sending the same key code. Closes #17458. --- src/generic/listctrl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 4903e3d440..63e8563c1f 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -2994,6 +2994,12 @@ void wxListMainWindow::OnChar( wxKeyEvent &event ) case WXK_RETURN: case WXK_EXECUTE: + if ( event.HasModifiers() ) + { + event.Skip(); + break; + } + SendNotify( m_current, wxEVT_LIST_ITEM_ACTIVATED ); break;