aboutsummaryrefslogtreecommitdiff
path: root/src/reducers
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/reducers
parent8ba490ea1179fee73407815f69cdcea6e25c9281 (diff)
load keymaps from storage
Diffstat (limited to 'src/reducers')
-rw-r--r--src/reducers/input.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/reducers/input.js b/src/reducers/input.js
index eb7ff24..dca26e2 100644
--- a/src/reducers/input.js
+++ b/src/reducers/input.js
@@ -2,6 +2,7 @@ import actions from '../actions';
const defaultState = {
keys: [],
+ keymaps: {}
};
export default function reducer(state = defaultState, action = {}) {
@@ -19,6 +20,11 @@ export default function reducer(state = defaultState, action = {}) {
return Object.assign({}, state, {
keys: [],
});
+ case actions.INPUT_SET_KEYMAPS:
+ return Object.assign({}, state, {
+ keymaps: action.keymaps,
+ keys: [],
+ });
default:
return state;
}