Skip to content

Harden scroll-mode keyboard suppression to prevent intermittent text echo - #12

Closed
0RuiAlvel0 with Copilot wants to merge 2 commits into
mainfrom
copilot/disable-char-echo-in-scroll-mode
Closed

0RuiAlvel0 with Copilot wants to merge 2 commits into
mainfrom
copilot/disable-char-echo-in-scroll-mode

Conversation

Copilot AI commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

While scroll mode is active, some key events were occasionally falling through to the focused app, causing unintended character input (for example in editors). This change makes scroll-mode suppression deterministic by treating hook handling as fail-closed during that mode.

  • Input suppression behavior

    • In TrayApplicationContext, HandleKeyboardHookKeyDown and HandleKeyboardHookKeyUp now capture whether the app is in ScrollMode at entry and always return handled when it is.
    • This prevents any key from leaking to the foreground window during a scroll-mode session, including edge paths where downstream handlers return false.
  • Scope of change

    • Kept to keyboard-hook return-path logic only; no changes to scroll direction mapping, mode transitions, or settings behavior.
var handled = RunOnUiThread(() => OnGlobalKeyDown(key));
return isScrollMode || handled;

Co-authored-by: 0RuiAlvel0 <8639820+0RuiAlvel0@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix character echo suppression in scroll mode Harden scroll-mode keyboard suppression to prevent intermittent text echo Sep 11, 2026
Copilot AI requested a review from 0RuiAlvel0 September 11, 2026 04:02
@0RuiAlvel0

Copy link
Copy Markdown
Owner

nope, this screwed up the interaction. It was impossible to come out of scroll mode with esc - this issue needs more attention. Not merged, not accepted not even for further review.

@0RuiAlvel0 0RuiAlvel0 closed this Sep 11, 2026
@0RuiAlvel0
0RuiAlvel0 deleted the copilot/disable-char-echo-in-scroll-mode branch September 11, 2026 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suppression of characters printing while in scroll mode fails at time

2 participants