Skip to content

Expose dictation chords for native backend shortcuts - #14629

Open
dhh wants to merge 2 commits into
quattrofrom
dictation-key-ownership
Open

dhh wants to merge 2 commits into
quattrofrom
dictation-key-ownership

Conversation

@dhh

@dhh dhh commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

A backend with native dictation shortcuts needs to remove Omarchy's matching bindings to avoid triggering both handlers. Extract the dictation_keys portion of #14620 into a small, generic integration contract.

Populate o.dictation_keys from the actual binding calls, with one entry per chord for both press and release. Reset ownership on every configuration load, including when default bindings are disabled. The registry is empty without a selected backend. Backend integrations can check the registry and call hl.unbind(keys) once before registering their own shortcut. Document the contract, including disabled default bindings and personal overrides.

Validation: dictation, Hyprland default configuration, and binding conflict tests pass. Verified in the running compositor that one hl.unbind("F9") removes both F9 bindings without config errors; restored the original configuration afterwards.

Claude review identified stale ownership when disabling default bindings; fixed with a regression test that seeds previous ownership. Confirmed that removing the reset makes the test fail.

@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues remain in the reviewed changes.

Summary

This PR exposes Omarchy’s dictation chords through o.dictation_keys so native backends can remove matching bindings.

  • The latest change clears old ownership even when default bindings are disabled.
  • The regression test seeds old ownership and checks that it disappears.
  • The documentation explains chord ownership and when backend shortcuts load.
  • No new actionable issues were found. Tests were not run during this review.

Reviews (2) · Last reviewed commit: "Clear dictation key ownership when defau..." · Reviewed by Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants