fix(developer): Allow unhandled keys to go through to debugger memo

Fixes #2690.
Fixes #3082.

In the debugger, key events such as Enter, Ctrl+C, Ctrl+V were being
swallowed by the debug engine if they did not have rules within the
keyboard. This change emits the key events so the debug memo can
process them normally.
This commit is contained in:
Marc Durdin 2020-12-23 15:30:56 +11:00
parent 6de531259d
commit dce865ed4e

View file

@ -166,7 +166,7 @@ BOOL ProcessHook()
_td->app->QueueAction(QIT_VSHIFTUP, Globals::get_ShiftState());
fOutputKeystroke = FALSE;
}
else if (!_td->TIPFUpdateable) {
else if (!_td->TIPFUpdateable) {
//
// #2759: kmtip calls this function twice for each keystroke, first to
// determine if we are doing processing work (IsUpdateable() == FALSE),
@ -179,6 +179,17 @@ BOOL ProcessHook()
}
}
if (fOutputKeystroke && _td->app->DebugControlled()) {
// The debug memo does not receive default key events because
// we capture them all here. So we synthesize the key event for
// the debugger.
_td->app->QueueAction(QIT_VSHIFTDOWN, Globals::get_ShiftState());
_td->app->QueueAction(QIT_VKEYDOWN, _td->state.vkey);
_td->app->QueueAction(QIT_VKEYUP, _td->state.vkey);
_td->app->QueueAction(QIT_VSHIFTUP, Globals::get_ShiftState());
fOutputKeystroke = FALSE;
}
if(*Globals::hwndIM() == 0 || *Globals::hwndIMAlways())
{
_td->app->SetCurrentShiftState(Globals::get_ShiftState());