Repository navigation
Conversation
A text macro composes a prompt but deliberately leaves it unsubmitted, so
finishing a dictated line still meant reaching for the keyboard. A `"chords"`
entry presses keys in the focused agent's pane instead of typing into it, which
is the other half of that gesture: `{"chords": {"12": "enter"}}` makes the
bottom-right key submit.
The names are Herdr's own, handed to `pane.send_keys` untouched, so a chord is
whatever that vocabulary allows — "enter", "esc", "ctrl+alt+u", or an array
pressed in order. A chord outranks a text macro on the same key: the text
defaults are inherited rather than chosen, so an explicit chord should not have
to unbind one first.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch has not been deployed
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.
What
Adds an optional
"chords"section to~/.config/micromanager/config.json, binding a pad key to keys pressed in the focused agent's pane:{ "chords": { "12": "enter" } }Why
A text macro composes a prompt but deliberately leaves it unsubmitted — "you still read it and press enter", as the README puts it. That's the right default, but it means finishing a dictated line still requires the keyboard. A chord closes the loop: dictate into an agent pane, then tap the key to submit.
How
HerdrClient.sendKeysalready existed and is already used byTuneControllerto drive the model menu (["up"],["enter"],["esc"]), so this is dispatch plumbing rather than new capability. Chord names are passed topane.send_keysuntouched, so the vocabulary is Herdr's —"enter","esc","ctrl+alt+u"— and an array is a sequence pressed in order.A chord outranks a text macro on the same key. The reasoning: the
KeyBindings.defaultsentries are inherited rather than chosen, so an explicitly configured chord shouldn't have to unbind one first.Scope is the flexible keys —
macroKeyIDs + voiceKeyIDs(9, 10, 11, 12) — the same set that already accepts text macros, addressed the same way including"10+11". The key keeps itsKV_OAI_AG*binding, so it stays lit and keeps reporting presses, and nothing touches the device keymap.Limitations, stated up front
CGEventsynthesis (asVoiceControllerdoes for right command) would be the route if that's ever wanted.lastErrorin the panel.Testing
KeyBindingsTests: string form, array form,""unbind,"10+11"expansion, chord-beats-text precedence, and malformed input falling back to defaults.LiveDeviceTests.testDeviceKeymapHasTheStackKeyBound. It fails on my Creator Micro 2 because the joystick reportstype: VENDORwith an emptysectorsarray, soisAgentKeymapAppliedcan never return true. Happy to open that separately if it's news; it also meansapply()does a flash write on every connect for such a pad.🤖 Generated with Claude Code