From 5ac1f60ece0a112a55f329ed34b455dcc776b22c Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Tue, 3 Oct 2017 20:58:50 +0900 Subject: remove deprecated property in KeyboardEvent --- src/actions/input.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/actions/input.js') diff --git a/src/actions/input.js b/src/actions/input.js index 07948a1..67788dd 100644 --- a/src/actions/input.js +++ b/src/actions/input.js @@ -1,10 +1,16 @@ import actions from '../actions'; -const keyPress = (code, ctrl) => { +const asKeymapChars = (key, ctrl) => { + if (ctrl) { + return ''; + } + return key; +}; + +const keyPress = (key, ctrl) => { return { type: actions.INPUT_KEY_PRESS, - code, - ctrl + key: asKeymapChars(key, ctrl), }; }; -- cgit v1.2.3