]> git.scottworley.com Git - vopamoi/commitdiff
Mostly ignore inputs when control is pressed
authorScott Worley <scottworley@scottworley.com>
Sat, 29 Jan 2022 21:01:42 +0000 (13:01 -0800)
committerScott Worley <scottworley@scottworley.com>
Sat, 29 Jan 2022 21:01:42 +0000 (13:01 -0800)
vopamoi.ts

index 7d2f3ee425c60665455ac5eb1e413ebd1ed32ce3..9137ff55b60ff26c142e317f17de247e9deb01c7 100644 (file)
@@ -512,6 +512,7 @@ function handleKey(event: any) {
       if (event.key == "Escape") return browserUI.completeEdit(event, CommitOrAbort.Abort);
     }
   } else {
+    if (event.ctrlKey) return; // eg: Don't redo when user refreshes the page with ctrl-R
     if (inputState === InputState.Root) {
       if ("0" <= event.key && event.key <= "9") {
         return (inputCount = (inputCount ?? 0) * 10 + parseInt(event.key));