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/reducers/input.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/reducers') 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; } -- cgit v1.2.3