Handle more wxTextCtrl accelerators in MSWShouldPreProcessMessage()
Ensure that Shift-{Home,End,Left,Right} can still be used for selecting text in the control even if they're also used as accelerators. Closes https://github.com/wxWidgets/wxWidgets/pull/2511
This commit is contained in:
committed by
Vadim Zeitlin
parent
4a7ac90ce3
commit
b3f609781e
@@ -1123,13 +1123,23 @@ bool wxTextEntry::MSWShouldPreProcessMessage(WXMSG* msg) const
|
||||
case VK_DELETE:
|
||||
case VK_HOME:
|
||||
case VK_END:
|
||||
case VK_LEFT:
|
||||
case VK_RIGHT:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else // Shift is pressed
|
||||
{
|
||||
if ( vkey == VK_INSERT || vkey == VK_DELETE )
|
||||
return false;
|
||||
switch ( vkey )
|
||||
{
|
||||
case VK_INSERT:
|
||||
case VK_DELETE:
|
||||
case VK_HOME:
|
||||
case VK_END:
|
||||
case VK_LEFT:
|
||||
case VK_RIGHT:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user