aboutsummaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-09-27 21:51:39 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-09-30 13:32:34 +0900
commite97ffafea319af56c8e446623f33dc32bebba40e (patch)
treefefc2326841c21e181a86c73adc1dfd808691e87 /src/actions
parent8ba490ea1179fee73407815f69cdcea6e25c9281 (diff)
load keymaps from storage
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/index.js1
-rw-r--r--src/actions/input.js9
2 files changed, 9 insertions, 1 deletions
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 };