How to use the atom-keymap.KeymapManager function in atom-keymap

To help you get started, we’ve selected a few atom-keymap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / atom-keymap / atom-keymap-tests.ts View on Github external
import { KeymapManager, ICompleteMatchEvent } from "atom-keymap";

var manager = new KeymapManager();
manager.add('some/unique/path', {
    '.workspace': {
        'ctrl-x': 'package:do-something',
        'ctrl-y': 'package:do-something-else'
    },
    '.mini.editor': {
        'enter': 'core:confirm'
    }
});

manager.onDidMatchBinding((event: ICompleteMatchEvent): void => {
    console.log(event.binding.command);
})

manager.destroy();

atom-keymap

Atom's DOM-aware keymap module

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis

Similar packages