From 090a54c6e6b8470c80755f4f7b9bce86ea1779aa Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 15 Jul 2021 14:45:37 +1000 Subject: [PATCH] support numpad enter in type answer https://forums.ankiweb.net/t/anki-2-1-45-beta/10664/149 regression introduced in dc61a6f547 --- qt/aqt/data/web/js/reviewer.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt/aqt/data/web/js/reviewer.ts b/qt/aqt/data/web/js/reviewer.ts index a46d876f4..92fb7ee2a 100644 --- a/qt/aqt/data/web/js/reviewer.ts +++ b/qt/aqt/data/web/js/reviewer.ts @@ -173,7 +173,8 @@ function _drawMark(mark: boolean): void { } function _typeAnsPress(): void { - if ((window.event as KeyboardEvent).code === "Enter") { + const code = (window.event as KeyboardEvent).code; + if (["Enter", "NumpadEnter"].includes(code)) { pycmd("ans"); } }