Skip to content

Stop the keyboard and mouse panel depending on other windows - #942

Merged
enaboapps merged 4 commits into
mainfrom
panels-independent
Sep 28, 2026
Merged

enaboapps merged 4 commits into
mainfrom
panels-independent

Conversation

@enaboapps

@enaboapps enaboapps commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #941

Change

The scanning keyboard and the mouse panel no longer depend on other applications' windows.

Before Now
Neither panel could start or continue with no window in front They open and scan with only the desktop showing
A window change between two checks could end a panel with the point scan message Nothing about other windows or displays is checked while a panel is open
A window change turned off the keyboard's latched modifiers and Caps and sent the highlight to the start They stay as they are
A taskbar that hides, or a changed display, closed the keyboard The keyboard moves to fit. It keeps its display by name; if that display is removed, it moves to the display under the pointer
A keyboard that failed to open from the mouse panel left the action menu over a point chosen earlier It returns to the mouse panel, and opening the mouse panel forgets the earlier point

Point scanning

Point scanning and its menus stay tied to the window in front, so a click cannot land on the wrong window. One thing changes, to make leaving a panel reliable:

  • A point scan follows whichever window is in front, or none, until a switch is used in it. Before, a window change during the first sweep ended the scan even though nothing had been chosen.
  • From the first switch use, a change of window or display ends the scan as before.
  • The one-second wait for a window, added with automatic restart, is removed. It is no longer needed.

Kept on purpose

These belong to the text of one window, and stop Switchify editing the wrong application:

  • Suggestions and the prediction context clear when the window changes. Suggestions are unavailable while no window is in front.
  • A space or capital the keyboard owns is dropped.
  • Any input Switchify still holds is released.

Risk to be aware of

A locked Ctrl, Alt or Win now carries over when another window comes forward, so the next key is a shortcut there. The modifier overlay and the keyboard both show the locked state.

Validation at c8dec25

All run locally on Windows and passing:

  • npm run lint, npm test, npm run build
  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test: 603 passed

The window and display handling runs in the native runtime. The decisions in it are unit tested: when a window change matters, and which display the keyboard belongs on. The order of the runtime's steps is not covered by automated tests. Not verified in the running app, on Windows or macOS.

🤖 Generated with Claude Code

@enaboapps enaboapps added this to the v1.0.0-rc.17 milestone Sep 28, 2026
OwenMcGirr and others added 4 commits September 28, 2026 13:06
The panels open and keep working with no window in front. A change of
window no longer ends a panel or resets the keyboard's modifiers, Caps
or highlight, and a change to the work area moves the keyboard to fit.
What belongs to the text of one window is still let go.

Closes #941

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Review follow-up: every point scan now follows whichever window is in
front, or none, until a switch is used in it, so a window coming
forward as a panel closes no longer ends it. The wait for a window is
gone with the need for it. The keyboard keeps its display by name,
stays put while displays cannot be read, and a keyboard that fails to
open from the mouse panel returns to the panel.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Review follow-up: a scan restarted by a change of mode follows the
window like any other. A scan that follows is not checked against the
window it has just taken up. The mouse panel stays where it is while
displays cannot be read, as the keyboard does.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The one-second wait described for automatic restart is gone.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@enaboapps
enaboapps marked this pull request as ready for review September 28, 2026 12:07
@enaboapps
enaboapps merged commit d26ae3c into main Sep 28, 2026
6 checks passed
@enaboapps
enaboapps deleted the panels-independent branch September 28, 2026 13:40
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.

Stop the keyboard and mouse panel depending on other windows

2 participants