From 003d7b1b35ca0818d185b4c12601e03dc51e0b71 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Wed, 1 Feb 2023 12:23:00 -0500 Subject: [PATCH] modify getKeyCodeEvent to match better. Fixes 336 --- lib/utils/get-key-code-event.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/get-key-code-event.ts b/lib/utils/get-key-code-event.ts index 58bdb56..cea21e6 100644 --- a/lib/utils/get-key-code-event.ts +++ b/lib/utils/get-key-code-event.ts @@ -6,6 +6,6 @@ export const getKeyCodeEvent = ( ): KeyCodeEvent | undefined => { return keyCodeEventValues.find( keyCodeEvent => - keyCodeEvent.code === keyCode.code && keyCodeEvent.key === keyCode.key + keyCodeEvent.code === keyCode.code || keyCodeEvent.key === keyCode.key ) }