From dea59095743755a626590aa1b06e67154c372672 Mon Sep 17 00:00:00 2001 From: ChenX Date: Tue, 5 Nov 2019 10:35:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=8F=E8=94=BD=E9=94=AE=E7=9B=98=E7=BC=A9?= =?UTF-8?q?=E6=94=BE=E9=A1=B5=E9=9D=A2=E5=BF=AB=E6=8D=B7=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 5b4fae996..ca5421d74 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -42,6 +42,19 @@ document.addEventListener('wheel', (e: WheelEvent) => } }, { passive: false }); +document.addEventListener("keydown", (e: KeyboardEvent) => +{ + if (e.ctrlKey) + { + if (e.key === "-" || e.key === "=") + { + e.returnValue = false; + e.preventDefault(); + e.stopPropagation(); + } + } +}), { passive: false }; + window.onload = function () { function isWebGLAvailable()