key input sequence as action/reducer

This commit is contained in:
Shin'ya Ueoka 2017-09-10 21:28:00 +09:00
parent adc6a5175c
commit 879b5afe66
9 changed files with 135 additions and 127 deletions

15
src/actions/input.js Normal file
View file

@ -0,0 +1,15 @@
import actions from '../actions';
export function keyPress(code, ctrl) {
return {
type: actions.INPUT_KEY_PRESS,
code,
ctrl
};
}
export function clearKeys() {
return {
type: actions.INPUT_CLEAR_KEYS
}
}