window-shortcuts

0.4.0 • Public • Published

window-shortcuts

macOS only! Get menu shortcuts by window owner name.

Install

$ npm install window-shortcuts

Usage

Async

import windowShortcuts from 'window-shortcuts'

windowShortcuts('iTerm2')
  .then(shortcuts => {
    console.log(shortcuts)
    /*
    [
      {
        "title": "Preferences...",
        "keys": [
          "Meta",
          ","
        ],
        "group": "iTerm2"
      },
      {
        "keys": [
          "Meta",
          "h",
        ],
        "title": "Hide iTerm2",
        "group": "iTerm2",
      },
      ...
    ]
    */
  })
  .catch(error => console.log(error))

Sync

const shortcuts = windowShortcuts.sync('iTerm2')

Package Sidebar

Install

npm i window-shortcuts

Weekly Downloads

6

Version

0.4.0

License

MIT

Unpacked Size

112 kB

Total Files

5

Last publish

Collaborators

  • philippkuehn