remove deprecated property in KeyboardEvent

This commit is contained in:
Shin'ya Ueoka 2017-10-03 20:58:50 +09:00
parent eff8d9a83e
commit 5ac1f60ece
10 changed files with 32 additions and 87 deletions
src/reducers

View file

@ -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;