aboutsummaryrefslogtreecommitdiff
path: root/src/background/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/index.js')
-rw-r--r--src/background/index.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/background/index.js b/src/background/index.js
index f1a7217..7618384 100644
--- a/src/background/index.js
+++ b/src/background/index.js
@@ -6,13 +6,10 @@ import KeyQueue from './key-queue';
const queue = new KeyQueue();
-const keyDownHandle = (request, sender, sendResponse) => {
+const keyPressHandle = (request, sender, sendResponse) => {
let action = queue.push({
code: request.code,
- shift: request.shift,
- ctrl: request.ctrl,
- alt: request.alt,
- meta: request.meta
+ ctrl: request.ctrl
});
if (!action) {
return;
@@ -76,8 +73,8 @@ const cmdEnterHandle = (request, sender) => {
browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
switch (request.type) {
- case 'event.keydown':
- keyDownHandle(request, sender, sendResponse);
+ case 'event.keypress':
+ keyPressHandle(request, sender, sendResponse);
break;
case 'event.cmd.enter':
cmdEnterHandle(request, sender, sendResponse);