Skip to content

fix: restore native Fn and normal Command keys on macOS - #9

Open
anko9801 wants to merge 1 commit into
masterfrom
codex/restore-native-fn
Open

anko9801 wants to merge 1 commit into
masterfrom
codex/restore-native-fn

Conversation

@anko9801

@anko9801 anko9801 commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

 macOS keyboard
- start Kanata automatically and switch Eisu/Kana on Command taps
+ preserve native Fn and ordinary Command keys
+ keep native Caps Lock-to-Control and disable Fn input-mode switching

Physical Fn+Delete failed while Kanata captured the keyboard. Excluding Fn from its processing loop did not fix it; stopping the daemon restored Fn, confirmed on the user's Mac. Remove the macOS Kanata LaunchDaemon declaration so future nix-darwin activation removes the old job. The live job is already stopped and persistently disabled with launchd.

Remove Command tap actions from the retained manual macOS config and set AppleFnUsageType = 0. Preserve the existing function-row setting. Caps Lock now acts as native Control; Caps tap-to-Escape is inactive. Linux/Windows mappings and the existing virtual-driver approval remain unchanged.

Evidence

  • Before: unwanted Command-tap input switching; Fn+Delete still failed with Fn excluded from Kanata processing.
    After: the user confirmed Command taps no longer switch input and physical Fn+Delete works after Kanata stops.
  • Verified the live job is absent, its persistent launchd override is disabled and the Fn input action is 0. No full OS activation, Dock restart or research-job changes were performed.
  • Real module evaluation checks no macOS capture service is declared, native Caps-Control/Fn preferences remain correct, and Linux/Windows retain their input mappings. Startup guard tests, actual Kanata config parsing, formatting, statix, deadnix and pre-commit checks pass.
  • Full local flake checking was refused by the memory-pressure guard. The final head passes full flake/lint, macOS desktop tests and Darwin build, Linux Home Manager build/activation and NixOS build. An actual reboot has not been tested.
  • Existing SSH and Homebrew edits are excluded.

Merge Danger

Door: two-way

Reverting the change and re-enabling the live service requires separate launchd activation. Re-enabling capture may reproduce the Fn problem and should be checked physically first.

Blast Radius: Keyboard

macOS loses the Kanata Caps tap-to-Escape behavior while retaining native Caps-Control. No permissions are expanded and no packages or drivers are removed.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Details
Benchmark suite Current: 2f6e05d Previous: 8141402 Ratio
zsh first prompt 22 ms 16 ms 1.38
zsh full init 57 ms 44 ms 1.30
neovim startup 105 ms 81 ms 1.30
starship prompt 19 ms 13 ms 1.46

This comment was automatically generated by workflow using github-action-benchmark.

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