From b062fade9feb1c14d9e26aba80a5098e107ea2a5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 11 Nov 2011 14:26:06 +0000 Subject: [PATCH] Intercept some keys in wxMSW wxTextCtrl even if they're used as accelerators. Bare (i.e. without any modifiers) Delete, Home and End keys are also required by the text control itself so don't handle them as accelerators when wxTextCtrl has focus. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/textctrl.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 7393cdf0fa..4792c8de81 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -1780,8 +1780,19 @@ bool wxTextCtrl::MSWShouldPreProcessMessage(WXMSG* msg) // fall through case 0: - if ( IsMultiLine() && vkey == VK_RETURN ) - return false; + switch ( vkey ) + { + case VK_RETURN: + // This one is only special for multi line controls. + if ( !IsMultiLine() ) + break; + // fall through + + case VK_DELETE: + case VK_HOME: + case VK_END: + return false; + } // fall through case 2: break; -- 2.45.2