aboutsummaryrefslogtreecommitdiff
path: root/src/content/index.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-08-13 10:27:24 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-08-13 10:58:30 +0900
commite7342e9c237e1deea69ed66e07b7f79cd534056e (patch)
tree996fb5f46f0ed47bb6c85367ac59b7acfa11ef73 /src/content/index.js
parent6bdacc7758d6bda37ec9a1ecd64a65b7482fefed (diff)
use key-code
Diffstat (limited to 'src/content/index.js')
-rw-r--r--src/content/index.js4
1 files changed, 2 insertions, 2 deletions
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,