Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuanqing/macos-keyboard-shortcuts
:keyboard: A CLI to set application-specific keyboard shortcuts for macOS
https://github.com/yuanqing/macos-keyboard-shortcuts
keyboard-shortcuts macos
Last synced: 10 days ago
JSON representation
:keyboard: A CLI to set application-specific keyboard shortcuts for macOS
- Host: GitHub
- URL: https://github.com/yuanqing/macos-keyboard-shortcuts
- Owner: yuanqing
- License: mit
- Created: 2019-10-09T00:27:38.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-30T07:40:48.000Z (almost 4 years ago)
- Last Synced: 2024-08-09T17:37:21.386Z (3 months ago)
- Topics: keyboard-shortcuts, macos
- Language: TypeScript
- Homepage:
- Size: 214 KB
- Stars: 12
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/funding.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# macos-keyboard-shortcuts [![npm Version](https://img.shields.io/npm/v/macos-keyboard-shortcuts?cacheSeconds=1800)](https://www.npmjs.org/package/macos-keyboard-shortcuts) [![build](https://github.com/yuanqing/macos-keyboard-shortcuts/workflows/build/badge.svg)](https://github.com/yuanqing/macos-keyboard-shortcuts/actions?query=workflow%3Abuild)
> A CLI to set application-specific keyboard shortcuts for macOS
## Quick start
*Requires [Node.js](https://nodejs.org/).*
```
$ cat shortcuts.json
{
"Figma": {
"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"
}
}
}
$ npx macos-keyboard-shortcuts set shortcuts.json
Set 11 keyboard shortcuts
```See that:
- Root keys are macOS applications names.
- The “path” to each menu item is specified via a nested JSON object.
- The leaf values are the keyboard keys, separated by a space. Use `cmd`, `ctrl`, `opt`, and `shift` for modifier keys, and `up`, `down`, `left`, and `right` for arrow keys.## Usage
```
Usage
$ macos-keyboard-shortcuts [options]Available Commands
set Sets the keyboard shortcuts as defined in the specified file
unset Unsets the keyboard shortcuts as defined in the specified fileFor more info, run any command with the `--help` flag
$ macos-keyboard-shortcuts set --help
$ macos-keyboard-shortcuts unset --helpOptions
-v, --version Displays current version
-h, --help Displays this message```
## Installation
```
$ npm install --global macos-keyboard-shortcuts
```## License
[MIT](/LICENSE.md)