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.setActiveConstruct(null)));
    key('esc', () => store.dispatch(actions.setInfo(null)));
    key('esc', () => store.dispatch(actions.setItemEquip(null)));
    key('esc', () => store.dispatch(actions.setItemUnequip(null)));
    key('esc', () => store.dispatch(actions.setVboxHighlight([])));
    key('esc', () => store.dispatch(actions.setConstructDeleteId(null)));
}

module.exports = setupKeys;
