From e97ffafea319af56c8e446623f33dc32bebba40e Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Wed, 27 Sep 2017 21:51:39 +0900 Subject: load keymaps from storage --- src/actions/index.js | 1 + src/actions/input.js | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/actions') diff --git a/src/actions/index.js b/src/actions/index.js index 977b3c2..7b79864 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -8,4 +8,5 @@ export default { // User input INPUT_KEY_PRESS: 'input.key,press', INPUT_CLEAR_KEYS: 'input.clear.keys', + INPUT_SET_KEYMAPS: 'input.set,keymaps', }; diff --git a/src/actions/input.js b/src/actions/input.js index 07948a1..de6de4e 100644 --- a/src/actions/input.js +++ b/src/actions/input.js @@ -14,4 +14,11 @@ const clearKeys = () => { }; }; -export { keyPress, clearKeys }; +const setKeymaps = (keymaps) => { + return { + type: actions.INPUT_SET_KEYMAPS, + keymaps: keymaps + }; +}; + +export { keyPress, clearKeys, setKeymaps }; -- cgit v1.2.3