From e7342e9c237e1deea69ed66e07b7f79cd534056e Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 13 Aug 2017 10:27:24 +0900 Subject: use key-code --- src/content/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/content/index.js') diff --git a/src/content/index.js b/src/content/index.js index e77bb0a..514f964 100644 --- a/src/content/index.js +++ b/src/content/index.js @@ -11,9 +11,9 @@ const invokeEvent = (type) => { } } -window.addEventListener("keypress", (e) => { +window.addEventListener("keydown", (e) => { browser.runtime.sendMessage({ - key: e.which || e.keyCode, + code: e.keyCode, shift: e.shift, alt: e.alt, meta: e.meta, -- cgit v1.2.3