|
@@ -315,13 +315,13 @@ const allowKey = [
|
|
"ArrowLeft",
|
|
"ArrowLeft",
|
|
"ArrowRight",
|
|
"ArrowRight",
|
|
"#",
|
|
"#",
|
|
- "ShiftLeft",
|
|
|
|
"Shift",
|
|
"Shift",
|
|
"[A-Za-z]",
|
|
"[A-Za-z]",
|
|
];
|
|
];
|
|
const allowKeyRef = new RegExp(allowKey.join("|"));
|
|
const allowKeyRef = new RegExp(allowKey.join("|"));
|
|
|
|
|
|
function onPreventAnswerKey(e: KeyboardEvent) {
|
|
function onPreventAnswerKey(e: KeyboardEvent) {
|
|
|
|
+ console.log(e)
|
|
if (!allowKeyRef.test(e.key)) {
|
|
if (!allowKeyRef.test(e.key)) {
|
|
e.preventDefault();
|
|
e.preventDefault();
|
|
}
|
|
}
|