Skip to content

Commit 3d34ed5

Browse files
committed
fix: monkey not typing in layout emulator
1 parent 3dc783f commit 3d34ed5

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

frontend/src/ts/input/handlers/keydown.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ export async function onKeydown(event: KeyboardEvent): Promise<void> {
170170
return;
171171
}
172172

173+
if (!event.repeat) {
174+
//delaying because type() is called before show()
175+
// meaning the first keypress of the test is not animated
176+
setTimeout(() => {
177+
Monkey.type(event);
178+
}, 0);
179+
}
180+
173181
if (Config.layout !== "default") {
174182
const emulatedChar = await getCharFromEvent(event);
175183
if (emulatedChar !== null) {
@@ -179,14 +187,6 @@ export async function onKeydown(event: KeyboardEvent): Promise<void> {
179187
}
180188
}
181189

182-
if (!event.repeat) {
183-
//delaying because type() is called before show()
184-
// meaning the first keypress of the test is not animated
185-
setTimeout(() => {
186-
Monkey.type(event);
187-
}, 0);
188-
}
189-
190190
if (event.key === "Tab") {
191191
await handleTab(event, now);
192192
return;

0 commit comments

Comments
 (0)