diff options
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/index.js | 4 | ||||
-rw-r--r-- | src/actions/input.js | 15 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/actions/index.js b/src/actions/index.js index de3ab42..135dd4a 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -29,4 +29,8 @@ export default { FOLLOW_START: 'follow.start', HISTORY_PREV: 'history.prev', HISTORY_NEXT: 'history.next', + + // User input + INPUT_KEY_PRESS: 'input.key,press', + INPUT_CLEAR_KEYS: 'input.clear.keys', }; diff --git a/src/actions/input.js b/src/actions/input.js new file mode 100644 index 0000000..c72b9e0 --- /dev/null +++ b/src/actions/input.js @@ -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 + } +} |