Skip to content

feat(macos): support mouse-movement-key#2014

Merged
jtroo merged 1 commit intojtroo:mainfrom
FlameFlag:flameflag/push-zwpoqtqunzms
Apr 11, 2026
Merged

feat(macos): support mouse-movement-key#2014
jtroo merged 1 commit intojtroo:mainfrom
FlameFlag:flameflag/push-zwpoqtqunzms

Conversation

@FlameFlag
Copy link
Copy Markdown
Contributor

Describe your changes. Use imperative present tense.

Lift the parser and live-reload cfg gates to include macOS, and extend
the existing CGEventTap to also tap MouseMoved and *MouseDragged
events. On each cursor movement (drags included), emit a synthetic
KeyValue::Tap of the configured OsCode without suppressing the
underlying event, mirroring the Linux event-loop branch

Read the configured key live through a shared
Arc<Mutex<Option<OsCode>>> so live-reload changes take effect with no
extra plumbing. Extend the existing install gate to also install the tap
when only mouse-movement-key is set (no defsrc mouse buttons)

Add a parser regression test for the new cfg gate

Checklist

  • Add documentation to docs/config.adoc
    • Yes
  • Add example and basic docs to cfg_samples/kanata.kbd
    • N/A
  • Update error messages
    • N/A
  • Added tests, or did manual testing
    • Yes + Manual

Lift the parser and live-reload cfg gates to include macOS, and extend
the existing CGEventTap to also tap `MouseMoved` and `*MouseDragged`
events. On each cursor movement (drags included), emit a synthetic
`KeyValue::Tap` of the configured `OsCode` without suppressing the
underlying event, mirroring the Linux event-loop branch

Read the configured key live through a shared
`Arc<Mutex<Option<OsCode>>>` so live-reload changes take effect with no
extra plumbing. Extend the existing install gate to also install the tap
when only `mouse-movement-key` is set (no defsrc mouse buttons)

Add a parser regression test for the new cfg gate
@jtroo jtroo merged commit 166551e into jtroo:main Apr 11, 2026
5 checks passed
@FlameFlag FlameFlag deleted the flameflag/push-zwpoqtqunzms branch April 11, 2026 07:11
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.

2 participants