key input sequence as action/reducer
This commit is contained in:
parent
adc6a5175c
commit
879b5afe66
9 changed files with 135 additions and 127 deletions
15
src/actions/input.js
Normal file
15
src/actions/input.js
Normal 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
|
||||
}
|
||||
}
|
Reference in a new issue