How to use the react-hotkeys.recordKeyCombination function in react-hotkeys

To help you get started, we’ve selected a few react-hotkeys 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 Wicklets / wick-editor / src / Editor / Modals / SettingsModal / KeyboardShortcuts / KeyboardShortcuts.jsx View on Github external
beginEdit = (actionName, index) => {
    // Begin recording that we are editing a key.
    var cancelKeyRecording =  recordKeyCombination(
      (sequence) => this.changeKey(actionName, index, sequence)
    );

    // Set that we are editing a key.
    this.setState({
      editingAction: {actionName: actionName, index: index || 0}, 
      cancelKeyRecording: cancelKeyRecording,
    });


  }

react-hotkeys

A declarative library for handling hotkeys and focus within a React application

ISC
Latest version published 5 years ago

Package Health Score

59 / 100
Full package analysis