ignore alt and ctrl in hotkey
This commit is contained in:
parent
b539f292a6
commit
aad5243bb1
|
@ -440,9 +440,11 @@ function scrollprevioushonk() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("keydown", function(e) {
|
function hotkey(e) {
|
||||||
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement)
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement)
|
||||||
return;
|
return
|
||||||
|
if (e.ctrlKey || e.altKey)
|
||||||
|
return
|
||||||
|
|
||||||
switch (e.code) {
|
switch (e.code) {
|
||||||
case "KeyR":
|
case "KeyR":
|
||||||
|
@ -463,7 +465,9 @@ document.addEventListener("keydown", function(e) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
|
document.addEventListener("keydown", hotkey)
|
||||||
|
|
||||||
function addemu(elem) {
|
function addemu(elem) {
|
||||||
const data = elem.alt
|
const data = elem.alt
|
||||||
|
|
Loading…
Reference in New Issue