1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-09-29 01:29:03 +02:00

reordering

This commit is contained in:
Pomax
2020-08-12 22:27:57 -07:00
parent 6498341566
commit 60f24a5d1f
20 changed files with 661 additions and 380 deletions

View File

@@ -153,7 +153,10 @@ class BaseAPI {
// We don't want to interfere with the browser, so we're only
// going to allow unmodified keys, or shift-modified keys,
// and tab has to always work. For obvious reasons.
if (!evt.altKey && !evt.ctrlKey && !evt.metaKey && evt.key !== "Tab") {
const tab = evt.key !== "Tab";
const functionKey = evt.key.match(/F\d+/) === null;
const specificCheck = tab && functionKey;
if (!evt.altKey && !evt.ctrlKey && !evt.metaKey && specificCheck) {
this.stopEvent(evt);
}
}