From 036ede3379285cbe678d79aad3b9442dca8b31e6 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 5 Nov 2017 09:47:30 +0900 Subject: support mutliple modifiers for key bindings --- src/content/reducers/input.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/content/reducers/input.js') diff --git a/src/content/reducers/input.js b/src/content/reducers/input.js index 9457604..134aa95 100644 --- a/src/content/reducers/input.js +++ b/src/content/reducers/input.js @@ -1,18 +1,18 @@ import actions from 'content/actions'; const defaultState = { - keys: '' + keys: [] }; export default function reducer(state = defaultState, action = {}) { switch (action.type) { case actions.INPUT_KEY_PRESS: return Object.assign({}, state, { - keys: state.keys + action.key + keys: state.keys.concat([action.key]), }); case actions.INPUT_CLEAR_KEYS: return Object.assign({}, state, { - keys: '', + keys: [], }); default: return state; -- cgit v1.2.3