support numpad enter in type answer

https://forums.ankiweb.net/t/anki-2-1-45-beta/10664/149

regression introduced in f4f0298378
This commit is contained in:
Damien Elmes 2021-07-15 14:45:37 +10:00
parent 60f6fcccdc
commit 33afe8aa32

View File

@ -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");
}
}