Custom system keyboard shortcuts, without prefpane

Discussion in 'macOS' started by canhaz, Oct 14, 2013.

  1. canhaz macrumors regular

    Jan 17, 2012
    Hey folks

    So what I would love to be able to do is not have to remember to manually setup custom keys using the GUI, on a new install eg:


    But instead include custom keyboard mappings as part of my bootstrap bash script, that set's up any fresh OSX install has all my preferences and defaults in scriptable format. (I use brew and cask to install sw).

    	# opening and closing windows and popovers
    	defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
    	# smooth scrolling
    	defaults write -g NSScrollAnimationEnabled -bool false
    and for exports

    # Make sublime the default editor
    export EDITOR="subl"
    # Don’t clear the screen after quitting a manual page
    export MANPAGER="less -X"
    # Highlight section titles in manual pages
    export LESS_TERMCAP_md="$ORANGE"

    Does anyone know if this is possible?
  2. benwiggy macrumors 68020

    Jun 15, 2012
    Keyboard shortcuts are held in .plist files like most other preferences. I think it's

    It should be possible to use the defaults command to add them -- although some nested xml structures are beyond what defaults can cope with.

    How often do you need to reinstall the OS without restoring your user settings? Maybe there's an easier way of doing what you're trying to achieve by doing that, which doesn't include losing all your user prefs.
  3. canhaz thread starter macrumors regular

    Jan 17, 2012
    Thanks, I'll try that.

    To answer your question. I hardly ever reinstall, it's more a principle issue. If I made a customization, I'd like to record that in a standardized format.
  4. chown33 macrumors 604

    Aug 9, 2009
    descending into the Maelström

Share This Page