remove deprecated property in KeyboardEvent
This commit is contained in:
parent
eff8d9a83e
commit
5ac1f60ece
10 changed files with 32 additions and 87 deletions
src/actions
|
@ -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),
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Reference in a new issue