mnml/client/src/keyboard.jsx
2019-05-08 19:48:18 +10:00

16 lines
607 B
JavaScript

const key = require('keymaster');
const actions = require('./actions');
function setupKeys(store) {
console.log('binding keys');
key.unbind('esc');
key('esc', () => store.dispatch(actions.setCombiner([null, null, null])));
key('esc', () => store.dispatch(actions.setReclaiming(false)));
key('esc', () => store.dispatch(actions.setActiveSkill(null)));
key('esc', () => store.dispatch(actions.setActiveCryp(null)));
key('esc', () => store.dispatch(actions.setInfo([null, null])));
key('esc', () => store.dispatch(actions.setVboxHighlight([])));
}
module.exports = setupKeys;