don't eat Shift-Ctrl-[XCV] keys

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-08-30 21:30:28 +00:00
parent 4d7b7fc212
commit cf6e951cf2

View File

@@ -1189,24 +1189,42 @@ bool wxTextCtrl::MSWShouldPreProcessMessage(WXMSG* pMsg)
} }
else // no Alt else // no Alt
{ {
if ( wxIsCtrlDown() ) // we want to process some Ctrl-foo and Shift-bar but no key
// combinations without either Ctrl or Shift nor with both of them
// pressed
const int ctrl = wxIsCtrlDown(),
shift = wxIsShiftDown();
switch ( ctrl + shift )
{ {
switch ( vkey ) default:
{ wxFAIL_MSG( _T("how many modifiers have we got?") );
case 'C': // fall through
case 'V':
case 'X': case 0:
case VK_INSERT: case 2:
case VK_DELETE: break;
case VK_HOME:
case VK_END: case 1:
return FALSE; // either Ctrl or Shift pressed
} if ( ctrl )
} {
else if ( wxIsShiftDown() ) switch ( vkey )
{ {
if ( vkey == VK_INSERT || vkey == VK_DELETE ) case 'C':
return FALSE; case 'V':
case 'X':
case VK_INSERT:
case VK_DELETE:
case VK_HOME:
case VK_END:
return FALSE;
}
}
else // Shift is pressed
{
if ( vkey == VK_INSERT || vkey == VK_DELETE )
return FALSE;
}
} }
} }
} }