New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

keyconfig

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keyconfig

stores keyboard shortcut definitions

  • 0.7.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
increased by160%
Maintainers
1
Weekly downloads
 
Created
Source

keyconfig

stores keyboard shortcut definitions.

usage

var keyconfig = new Keyconfig({
  x: [ 
    { 
      name: 'foo', 
      binding: [ [ 'ctrl+z' ], [ 'command+z' ] ]
    } 
  ]
});

keyconfig
  .on('change', function (collection, model) { });
  .find({ name: 'x '})
  .find({ name: 'foo' })
  .update({ binding: ['command+d'] });

spec

Below is an example of a collection:

{
  "editor":
  [
    {
      "name": "save",
      "description": "Save",
      "binding": [
        [ "ctrl+s" ],
        [ "command+s" ]
      ],
      "options": {
        "enabled": true
      }
    }
  ]
}

### fields

  • name must be unique
  • binding is an array of two arrays that defines win and mac shortcuts respectively
  • description is description text
  • options is always extended when you do update

api

keyconfig(collections={})

Collection(name, models=[])

.add(model)

.update(name, value={}, silent=false)

.toJSON()

.getCollidingWin()

.getCollidingMac()

Keyconfig and Collection instances also proxy underscore methods.

Model(value={})

.update(value={}, silent=false)

.getWinKeys()

.getMacKeys()

.getWinChecksum()

.getMacChecksum()

.toJSON()

Updating a model triggers a change event that bubble up.

license

mit

Keywords

FAQs

Package last updated on 13 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc