diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-03 20:58:50 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-03 20:58:50 +0900 |
commit | 5ac1f60ece0a112a55f329ed34b455dcc776b22c (patch) | |
tree | 1c901a6529fd50b9e62d50a2131c3043ccfb5079 /src/reducers | |
parent | eff8d9a83edf63bab09df4bd7f6e20e85fba3899 (diff) |
remove deprecated property in KeyboardEvent
Diffstat (limited to 'src/reducers')
-rw-r--r-- | src/reducers/input.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/reducers/input.js b/src/reducers/input.js index eb7ff24..8be701e 100644 --- a/src/reducers/input.js +++ b/src/reducers/input.js @@ -1,23 +1,18 @@ import actions from '../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.concat([ - { - code: action.code, - ctrl: action.ctrl - } - ]) + keys: state.keys + action.key }); case actions.INPUT_CLEAR_KEYS: return Object.assign({}, state, { - keys: [], + keys: '', }); default: return state; |