macos-keyboard-shortcuts
A command-line utility to set application-specific keyboard shortcuts for macOS
Last updated 8 months ago by yuanqing .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install macos-keyboard-shortcuts 
SYNC missed versions from official npm registry.

macos-keyboard-shortcuts npm Version Build Status

A command-line utility to set application-specific keyboard shortcuts for macOS

Quick start

Requires Node.js.

$ cat shortcuts.json
{
  "com.figma.Desktop": {
    "Arrange": {
      "Align Bottom": "cmd ctrl b",
      "Align Horizontal Centers": "cmd ctrl h",
      "Align Left": "cmd ctrl l",
      "Align Right": "cmd ctrl r",
      "Align Top": "cmd ctrl t",
      "Align Vertical Centers": "cmd ctrl v"
    },
    "Plugins": {
      "Distribute Layers": {
        "Distribute Layers Left": "cmd shift l",
        "Distribute Layers Right": "cmd shift r",
        "Distribute Layers Up": "cmd shift u",
        "Distribute Layers Down": "cmd shift d"
      },
      "Move Layers": "cmd shift m",
    }
  }
}
$ npm install --global macos-keyboard-shortcuts
$ macos-keyboard-shortcuts set shortcuts.json
Set 11 keyboard shortcuts
  • The path to each menu item is specified via a nested JSON object.
  • The root keys correspond to the “domain” of the application.
  • The keys in each shortcut are separated by a space.
  • Use cmd, ctrl, opt, and shift for modifier keys, and up, down, left, and right for arrow keys.

Usage

$ macos-keyboard-shortcuts --help

  Usage
    $ macos-keyboard-shortcuts <command> [options]

  Available Commands
    set      Sets the keyboard shortcuts as defined in the specified file
    unset    Unsets the keyboard shortcuts as defined in the specified file

  For more info, run any command with the `--help` flag
    $ macos-keyboard-shortcuts set --help
    $ macos-keyboard-shortcuts unset --help

  Options
    -v, --version    Displays current version
    -h, --help       Displays this message

Installation

$ npm install --global macos-keyboard-shortcuts

License

MIT

Current Tags

  • 0.0.2                                ...           latest (8 months ago)

2 Versions

  • 0.0.2                                ...           8 months ago
  • 0.0.1                                ...           8 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |