Skip to content

Instantly share code, notes, and snippets.

@langolf
Last active February 18, 2021 16:52

Revisions

  1. langolf revised this gist Feb 18, 2021. No changes.
  2. langolf revised this gist Feb 18, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion index.md
    Original file line number Diff line number Diff line change
    @@ -8,4 +8,4 @@ The DefaultKeyBinding.dict above is an old-style property list1, defining key-va
    Standard dictionary key symbols are used: ~ alt, ^ control, $ shift, @ command.
    Therefore ~a means ⌥A (alt-A) and ^$1 would be ⌃⇧1 (control-shift-1).

    The value for each of the keys is set to ()—empty parentheses without a method. As DefaultKeyBinding.dict overrides /S*/L*/Fr*/AppKit.*/R*/StandardKeyBinding.dict, the shortcut is defined to be without method and therefore does nothing. It's preferable to create your own key bindings file like this rather than editing the system one.
    The value for each of the keys is set to ()—empty parentheses without a method. As DefaultKeyBinding.dict overrides /S*/L*/Fr*/AppKit.*/R\*/StandardKeyBinding.dict, the shortcut is defined to be without method and therefore does nothing. It's preferable to create your own key bindings file like this rather than editing the system one.
  3. langolf renamed this gist Feb 18, 2021. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. langolf revised this gist Feb 18, 2021. 1 changed file with 11 additions and 1 deletion.
    12 changes: 11 additions & 1 deletion index
    Original file line number Diff line number Diff line change
    @@ -1 +1,11 @@
    ‎‎​
    Save the following to ~/Library/KeyBindings/DefaultKeyBinding.dict (create if necessary).

    `{ "~a" = (); "~b" = (); "~c" = (); "~d" = (); "~e" = (); "~f" = (); "~g" = (); "~h" = (); "~i" = (); "~j" = (); "~k" = (); "~l" = (); "~m" = (); "~n" = (); "~o" = (); "~p" = (); "~q" = (); "~r" = (); "~s" = (); "~t" = (); "~u" = (); "~v" = (); "~w" = (); "~x" = (); "~y" = (); "~z" = (); }`
    This disables all the ⌥<letter> combinations. Restart apps to take effect.

    The DefaultKeyBinding.dict above is an old-style property list1, defining key-value pairs using the syntax { key = value }. In this case, the keys are the key combinations to activate the method in the value.

    Standard dictionary key symbols are used: ~ alt, ^ control, $ shift, @ command.
    Therefore ~a means ⌥A (alt-A) and ^$1 would be ⌃⇧1 (control-shift-1).

    The value for each of the keys is set to ()—empty parentheses without a method. As DefaultKeyBinding.dict overrides /S*/L*/Fr*/AppKit.*/R*/StandardKeyBinding.dict, the shortcut is defined to be without method and therefore does nothing. It's preferable to create your own key bindings file like this rather than editing the system one.
  5. langolf created this gist Feb 18, 2021.
    1 change: 1 addition & 0 deletions index
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    ‎‎​