From: Scott Worley Date: Sat, 29 Jan 2022 21:01:42 +0000 (-0800) Subject: Mostly ignore inputs when control is pressed X-Git-Url: http://git.scottworley.com/vopamoi/commitdiff_plain/bb25aeb64a51985374e378cd10e70e683be004f6 Mostly ignore inputs when control is pressed --- diff --git a/vopamoi.ts b/vopamoi.ts index 7d2f3ee..9137ff5 100644 --- a/vopamoi.ts +++ b/vopamoi.ts @@ -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));