diff --git a/windows/src/engine/keyman32/kmprocess.cpp b/windows/src/engine/keyman32/kmprocess.cpp index d1f76e1b61..41b8d0b87d 100644 --- a/windows/src/engine/keyman32/kmprocess.cpp +++ b/windows/src/engine/keyman32/kmprocess.cpp @@ -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());