Skip to content

Commit 5ef88ed

Browse files
committed
fix: Pressing 'r' to reset conflicts with the gamepad input #22
now both 'r' only resets when gamepad is not active, and "R" resets in both cases close #22
1 parent 356e504 commit 5ef88ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ function toggleButton(index: number) {
309309
}
310310

311311
document.addEventListener('keydown', (e) => {
312-
if ('r' === e.key) {
312+
if ('R' === e.key || (!enableGamepadPmod && 'r' === e.key)) {
313313
reset();
314314
}
315315
if (['0', '1', '2', '3', '4', '5', '6', '7'].includes(e.key)) {

0 commit comments

Comments
 (0)