Skip to content

Add configurable physical-key input-source bindings - #1

Merged
tonatoz merged 2 commits into
mainfrom
feat/configurable-key-bindings
Oct 5, 2026
Merged

tonatoz merged 2 commits into
mainfrom
feat/configurable-key-bindings

Conversation

@tonatoz

@tonatoz tonatoz commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

 Input-source bindings
-  Left Command and Right Command only
+  Two required rows and up to three optional rows
+  Physical character, function, navigation, editing, Command, Option, and Control keys
+  Native configuration window: Record Key, Apply, Cancel, Restore Standard Keys
  • Keep the two Command bindings as defaults and migrate legacy preferences.
  • Suppress assigned ordinary keys and their repeats. Preserve modifier-first shortcuts.
  • Switch modifier bindings after a solitary release. Keyboard, mouse, and scroll activity cancel the candidate.
  • Retain unavailable input-source IDs and pass their keys through until the source returns.
  • Commit window edits only with Apply. Disable quick source selection while the window is open.
  • Update the README, contributor guidance, and behavioral tests.

Evidence

  • Before: Regression checks failed for intrinsic Fn flags on function/navigation keys and missed releases.
    After: Checks pass for intrinsic Fn flags, physical Fn shortcuts, fresh presses after missed releases, and event-tap recovery.
  • Before: The app supported only two Command bindings.
    After: Native AppKit smoke checks covered five bindings, recording, duplicate rejection, Apply/Cancel, reset, unavailable sources, and persistence after restart.
  • Before: An ordinary unassigned A inserts text.
    After: Assigned A and its repeats insert no text. Command-A still selects all, and normal C replaces the selection.
  • make test and make lint passed.
  • swift build --build-system native passed. The default backend failed with Unknown error parsing property list in this environment.
  • make app -o build BIN=.build/debug/2cmd and codesign --verify --strict dist/2cmd.app passed.
  • Code and specification reviews found no remaining issues after fixes.

Merge Danger

Door: one-way

Migration removes legacy preference keys after saving the ordered bindings. An older binary cannot read the new bindings. Rollback requires restoring legacy preferences.

Blast Radius: keyboard

Assigned ordinary keys suppress their normal actions globally while enabled. Fn/Globe, Caps Lock, Shift, and multimedia keys cannot be assigned. Event-pairing regressions could affect typing or shortcuts.

@tonatoz
tonatoz merged commit 5865641 into main Oct 5, 2026
1 check passed
@tonatoz
tonatoz deleted the feat/configurable-key-bindings branch October 5, 2026 13:28
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