atom-keymap
Atom's DOM-aware keymap module
Last updated a year ago by nathansobo .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install atom-keymap 
SYNC missed versions from official npm registry.

Atom keymap

Build Status Dependency Status

Atom's DOM-aware keymap module

var KeymapManager, keymaps;
KeymapManager = require('atom-keymap')

keymaps = new KeymapManager
keymaps.defaultTarget = document.body

// Pass all the window's keydown events to the KeymapManager
document.addEventListener('keydown', function(event) {
  keymaps.handleKeyboardEvent(event)
})

// Add some keymaps
keymaps.loadKeymap('/path/to/keymap-file.json') // can also be a directory of json / cson files
// OR
keymaps.add('/key/for/these/keymaps', {
  "body": {
    "up": "core:move-up",
    "down": "core:move-down"
  }
})

// When a keybinding is triggered, it will dispatch it on the node that was focused
window.addEventListener('core:move-up', (event) => console.log('up', event))
window.addEventListener('core:move-down', (event) => console.log('down', event))

Development

The tests for this module must be run in Electron because they depend on browser APIs.

  • devtool is bundled as a development dependency to run the tests.
  • Native modules need to be compiled against the version of Electron included with devtool. Be sure to run electron-rebuild be sure recompile native dependencies before running tests.
  • Tests can be run in batch mode with npm test
  • If you want to use the debugger, profiler, etc or just speed up your flow by being able to refresh the devtool window to re-run tests, use the npm run test-drive script. This will keep devtool open instead of exiting after the test run.

Current Tags

  • 0.13.0-rc1                                ...           0.13.0-rc1 (6 years ago)
  • 0.14.0-rc1                                ...           0.14.0-rc1 (6 years ago)
  • 8.2.14                                ...           latest (a year ago)

153 Versions

  • 8.2.14                                ...           a year ago
  • 8.2.13-0                                ...           a year ago
  • 8.2.13                                ...           a year ago
  • 8.2.12                                ...           2 years ago
  • 8.2.11                                ...           2 years ago
  • 8.2.10                                ...           2 years ago
  • 8.2.9                                ...           3 years ago
  • 8.2.8                                ...           3 years ago
  • 8.2.7                                ...           3 years ago
  • 8.2.6                                ...           3 years ago
  • 8.2.5                                ...           3 years ago
  • 8.2.4                                ...           3 years ago
  • 8.2.3                                ...           3 years ago
  • 8.2.2                                ...           3 years ago
  • 8.2.1                                ...           3 years ago
  • 8.1.2                                ...           3 years ago
  • 8.1.1                                ...           3 years ago
  • 8.1.0                                ...           3 years ago
  • 8.0.2                                ...           3 years ago
  • 8.0.1                                ...           3 years ago
  • 8.0.0                                ...           3 years ago
  • 7.1.22                                ...           3 years ago
  • 7.1.21                                ...           3 years ago
  • 7.1.20                                ...           3 years ago
  • 7.1.19                                ...           4 years ago
  • 7.1.18                                ...           4 years ago
  • 7.1.17                                ...           4 years ago
  • 7.1.16                                ...           4 years ago
  • 7.1.15                                ...           4 years ago
  • 7.1.3-9                                ...           4 years ago
  • 7.1.14                                ...           4 years ago
  • 7.1.3-8                                ...           4 years ago
  • 7.1.13                                ...           4 years ago
  • 7.1.12                                ...           4 years ago
  • 7.1.3-7                                ...           4 years ago
  • 7.1.3-6                                ...           4 years ago
  • 7.1.11                                ...           4 years ago
  • 7.1.3-5                                ...           4 years ago
  • 7.1.10                                ...           4 years ago
  • 7.1.3-4                                ...           4 years ago
  • 7.1.9                                ...           4 years ago
  • 7.1.3-3                                ...           4 years ago
  • 7.1.8                                ...           4 years ago
  • 7.1.7                                ...           4 years ago
  • 7.1.3-2                                ...           4 years ago
  • 7.1.3-1                                ...           4 years ago
  • 7.1.6                                ...           4 years ago
  • 7.1.4                                ...           4 years ago
  • 7.1.3                                ...           4 years ago
  • 7.1.2                                ...           4 years ago
  • 7.1.1                                ...           4 years ago
  • 7.1.0                                ...           4 years ago
  • 7.0.8                                ...           4 years ago
  • 7.0.7                                ...           4 years ago
  • 7.0.6                                ...           4 years ago
  • 7.0.6-beta0                                ...           4 years ago
  • 7.0.5                                ...           4 years ago
  • 7.0.4                                ...           4 years ago
  • 7.0.4-beta0                                ...           4 years ago
  • 7.0.3                                ...           4 years ago
  • 7.0.2                                ...           4 years ago
  • 7.0.1                                ...           4 years ago
  • 7.0.0                                ...           4 years ago
  • 6.3.5                                ...           4 years ago
  • 6.3.4                                ...           4 years ago
  • 6.3.3                                ...           4 years ago
  • 6.3.3-beta1                                ...           4 years ago
  • 6.3.3-beta0                                ...           4 years ago
  • 6.3.2                                ...           4 years ago
  • 6.3.1                                ...           4 years ago
  • 6.3.0                                ...           4 years ago
  • 6.2.0                                ...           5 years ago
  • 6.1.1                                ...           5 years ago
  • 6.1.0                                ...           5 years ago
  • 6.0.0                                ...           5 years ago
  • 5.1.11                                ...           5 years ago
  • 5.1.10                                ...           5 years ago
  • 5.1.9                                ...           5 years ago
  • 5.1.8                                ...           5 years ago
  • 5.1.7                                ...           5 years ago
  • 5.1.6                                ...           5 years ago
  • 5.1.5                                ...           5 years ago
  • 5.1.4                                ...           5 years ago
  • 5.1.3                                ...           5 years ago
  • 5.1.2                                ...           5 years ago
  • 5.1.1                                ...           5 years ago
  • 5.1.0                                ...           5 years ago
  • 5.0.0                                ...           5 years ago
  • 4.0.0                                ...           5 years ago
  • 3.1.5                                ...           5 years ago
  • 3.1.4                                ...           5 years ago
  • 3.1.3                                ...           5 years ago
  • 3.1.2                                ...           5 years ago
  • 3.1.1                                ...           5 years ago
  • 3.1.0                                ...           6 years ago
  • 3.0.0                                ...           6 years ago
  • 2.5.2                                ...           6 years ago
  • 2.5.1                                ...           6 years ago
  • 2.5.0                                ...           6 years ago
  • 2.4.0                                ...           6 years ago
  • 2.3.3                                ...           6 years ago
  • 2.3.2                                ...           6 years ago
  • 2.3.1                                ...           6 years ago
  • 2.3.0                                ...           6 years ago
  • 2.2.2                                ...           6 years ago
  • 2.2.1                                ...           6 years ago
  • 2.2.0                                ...           6 years ago
  • 2.1.3                                ...           6 years ago
  • 2.1.2                                ...           6 years ago
  • 2.1.1                                ...           6 years ago
  • 2.1.0                                ...           6 years ago
  • 2.0.8                                ...           6 years ago
  • 2.0.7                                ...           6 years ago
  • 2.0.6                                ...           6 years ago
  • 2.0.5                                ...           6 years ago
  • 2.0.4                                ...           6 years ago
  • 2.0.3                                ...           6 years ago
  • 2.0.2                                ...           6 years ago
  • 2.0.1                                ...           6 years ago
  • 2.0.0                                ...           6 years ago
  • 1.0.2                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 0.28.0                                ...           6 years ago
  • 0.27.0                                ...           6 years ago
  • 0.26.0                                ...           6 years ago
  • 0.25.0                                ...           6 years ago
  • 0.24.0                                ...           6 years ago
  • 0.23.0                                ...           6 years ago
  • 0.22.0                                ...           6 years ago
  • 0.21.0                                ...           6 years ago
  • 0.20.0                                ...           6 years ago
  • 0.19.0                                ...           6 years ago
  • 0.18.0                                ...           6 years ago
  • 0.17.0                                ...           6 years ago
  • 0.16.0                                ...           6 years ago
  • 0.15.0                                ...           6 years ago
  • 0.14.0                                ...           6 years ago
  • 0.14.0-rc1                                ...           6 years ago
  • 0.13.0-rc1                                ...           6 years ago
  • 0.13.0                                ...           6 years ago
  • 0.12.0                                ...           6 years ago
  • 0.11.0                                ...           6 years ago
  • 0.10.0                                ...           6 years ago
  • 0.9.0                                ...           6 years ago
  • 0.8.0                                ...           6 years ago
  • 0.7.0                                ...           6 years ago
  • 0.6.0                                ...           6 years ago
  • 0.5.0                                ...           6 years ago
  • 0.4.0                                ...           6 years ago
  • 0.3.0                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 3
Last Month 14
Dependencies (9)
Dev Dependencies (27)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |