File size: 568 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
import event from '../../unit/event';
import actions from '../../actions';
const down = (store) => {
store.dispatch(actions.keyboard.music(true));
if (store.getState().get('lock')) {
return;
}
event.down({
key: 's',
once: true,
callback: () => {
if (store.getState().get('lock')) {
return;
}
store.dispatch(actions.music(!store.getState().get('music')));
},
});
};
const up = (store) => {
store.dispatch(actions.keyboard.music(false));
event.up({
key: 's',
});
};
export default {
down,
up,
};
|