Skip to content

Grammar input capture - #34

Merged
tacshi merged 4 commits into
mainfrom
grammar-input-capture
Oct 10, 2026
Merged

tacshi merged 4 commits into
mainfrom
grammar-input-capture

Conversation

@tacshi

@tacshi tacshi commented Oct 10, 2026

Copy link
Copy Markdown
Owner

No description provided.

Enable AXManualAccessibility for Electron apps so their input boxes are
visible, check the paragraph above a caret on a blank line, and read text
through AXStringForRange when an editor omits AXValue.
Draw Grammarly-style squiggles over each suggestion in a click-through
overlay, positioned from Accessibility bounds per visual line and clipped
to the visible editor. Clicking an underline opens the review at that
suggestion without taking focus; hovering a row highlights its text.
Underlines follow scrolling, dismissal, and applied edits, and can be
turned off in Grammar settings.
Write the replacement with AXSelectedText so applying no longer depends on
keyboard focus or the clipboard, and fall back to paste only when the
source is still untouched. Release the review panel's keyboard focus by
ordering it out, since calling resignKey() leaves keystrokes routed to it.
Find the focused element through the frontmost app first, since Electron
apps can fail the system-wide query. Open the review beside the caret's
line, falling back to the pointer when an editor exposes no text
geometry. Move Dismiss and Accept into the footer, acting on the selected
suggestion, and show explanations as a tooltip.
@tacshi
tacshi merged commit 26dfc4f into main Oct 10, 2026
1 check passed
@tacshi
tacshi deleted the grammar-input-capture branch October 10, 2026 06:19
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.

1 participant