Repository navigation
Paste into Sublime Text, Sublime Merge and Zed - #240
Merged
Merged
Conversation
These editors draw their own text views and expose no text element to Accessibility: with the caret in a buffer the focused element is the bare AXWindow (or the system-wide query fails with kAXErrorCannotComplete). They are neither browsers nor Electron, so the editability gate read them as "nothing editable focused" and every dictation fell back to copy-only. Add a custom-drawn-editor arm to isAXOpaqueApp, matched by bundle-ID prefix like the browser list. Measured on Sublime Text 4 (4215), Sublime Merge (2132) and Zed 1.23.2; a synthesized Cmd-V lands in all three. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Dictating into Sublime Text never pasted: the transcript always landed on the clipboard with the "Copied" notice. Sublime Merge and Zed behave the same way.
These editors draw their own text views and expose no text element to Accessibility. With the caret in a buffer, the focused element is the bare
AXWindow(no value, no selection range), or the system-wideAXFocusedUIElementquery fails withkAXErrorCannotComplete(-25204). They aren't browsers and don't bundle Electron, soisAXOpaqueAppwas false.KeyInjector.inserttherefore threw.noEditableTargetand fell back to copy-only.Fix
This adds a third kind of app to
FocusCapture.isAXOpaqueApp: custom-drawn editors, matched by bundle-ID prefix the same way the browser list is.com.sublimetext.covers Sublime Text 3 and 4com.sublimemergedev.zed.Zedcovers Zed, Preview and NightlyThe paste path itself is unchanged; this only widens the "paste even with no AX signal" exemption. The trade-off is the one browsers and Electron already accept: a rare ⌘V beep if nothing editable is focused.
Verification
CustomDrawnEditorBundleIDTestscover the matches, near-misses and nil. The wrappers are also pinned in the existing pass-through tests.swift test(bundle-ID, AX-opaque andKeyInjectorsuites),swiftlint --strict,swift-format lint --strict,check-invariants.shand Prettier all pass.scripts/check.sh(CI covers it) or a real spoken dictation in Blurt Dev.🤖 Generated with Claude Code