Basic Quickey Binder jsFiddle

by Udi Talias

HTML

<script src="https://unpkg.com/@quickey/binder/umd/quickey.binder.min.js"></script>

JavaScript

/**
 * For documentations, Refer to:
 * https://github.com/quickey/quickey/tree/master/packages/binder
 */

const {
  KeyBinder
} = Quickey.binder;

const keyBinder = new KeyBinder();

keyBinder.delegate = {
  didMatchFound: function(binder, matches, target) {
    console.log(binder, matches, target);
  }
}

keyBinder.bind({
  keys: "I > D > D > Q > D"
});

keyBinder.bind({
  keys: "Ctrl + H"
});