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/actions

View file

@ -1,10 +1,16 @@
import actions from '../actions';
const keyPress = (code, ctrl) => {
const asKeymapChars = (key, ctrl) => {
if (ctrl) {
return '<C-' + key.toUpperCase() + '>';
}
return key;
};
const keyPress = (key, ctrl) => {
return {
type: actions.INPUT_KEY_PRESS,
code,
ctrl
key: asKeymapChars(key, ctrl),
};
};