Skip to content

NSStandardKeyBindingResponding

Ken Harris edited this page Jan 28, 2019 · 2 revisions

Cool tricks with Key Bindings:

  • defaults write -g NSRepeatCountBinding -string "^u"

Then:

  • In your override func keyDown(with event: NSEvent), for any standard functionality, call interpretKeyEvents[event])
  • For basic moving/editing, have your NSView implement methods from NSStandardKeyBindingResponding (pre-10.14: NSResponder).

Your view now supports whatever keybindings the user wishes! Including, by default, Emacs-style.

Clone this wiki locally