diff options
-rw-r--r-- | src/content/actions/index.js | 2 | ||||
-rw-r--r-- | src/shared/utils/keys.js | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/content/actions/index.js b/src/content/actions/index.js index 1c51ab0..6976df7 100644 --- a/src/content/actions/index.js +++ b/src/content/actions/index.js @@ -6,7 +6,7 @@ export default { SETTING_SET: 'setting.set', // User input - INPUT_KEY_PRESS: 'input.key,press', + INPUT_KEY_PRESS: 'input.key.press', INPUT_CLEAR_KEYS: 'input.clear.keys', // Completion diff --git a/src/shared/utils/keys.js b/src/shared/utils/keys.js index 8a86dfb..85779c0 100644 --- a/src/shared/utils/keys.js +++ b/src/shared/utils/keys.js @@ -1,4 +1,4 @@ -const modifierdKeyName = (name) => { +const modifiedKeyName = (name) => { if (name.length === 1) { return name; } else if (name === 'Escape') { @@ -8,7 +8,7 @@ const modifierdKeyName = (name) => { }; const fromKeyboardEvent = (e) => { - let key = modifierdKeyName(e.key); + let key = modifiedKeyName(e.key); let shift = e.shiftKey; if (key.length === 1 && key.toUpperCase() === key.toLowerCase()) { // make shift false for symbols to enable key bindings by symbold keys. @@ -17,7 +17,7 @@ const fromKeyboardEvent = (e) => { } return { - key: modifierdKeyName(e.key), + key: modifiedKeyName(e.key), repeat: e.repeat, shiftKey: shift, ctrlKey: e.ctrlKey, |