Comment

Comment by eddyg

macOS supports emacs-like bindings natively: Ctrl-A/Ctrl-E for line start/end, Ctrl-K to kill, Ctrl-Y to yank, Ctrl-F/Ctrl-B for forward/back, etc.

They are defined in /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict. You can create ~/Library/KeyBindings/DefaultKeyBinding.dict to augment or override those.

Anything built on AppKit that uses the standard text system (NSTextView, NSTextField, and the field editors that back them) supports those bindings “for free”.

For non-native apps, Karabiner Elements⁽¹⁾ is the answer, using a config like this⁽²⁾.

⁽¹⁾ https://karabiner-elements.pqrs.org/

⁽²⁾ https://github.com/pdelfino/karabiner-config

parent eddyg 1 month ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton