From ee49db67754ca8648d847ab7b337f4de63ef629e Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Sat, 27 Jan 2024 18:32:23 -0800 Subject: [PATCH] filter debug logging --- src/components/grid/grid.tsx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/components/grid/grid.tsx b/src/components/grid/grid.tsx index e0812c8..f390215 100644 --- a/src/components/grid/grid.tsx +++ b/src/components/grid/grid.tsx @@ -111,16 +111,18 @@ function useKeyPress( ) { useEffect(() => { const listener = (eventRaw: Event) => { - console.log( - 'eventRaw', - eventRaw, - 'callback', - callback, - 'key', - key, - 'ctrlKey', - ctrlKey - ); + if (ctrlKey) { + console.log( + 'eventRaw', + eventRaw, + 'callback', + callback, + 'key', + key, + 'ctrlKey', + ctrlKey + ); + } // eslint-disable-next-line @typescript-eslint/no-explicit-any const event = eventRaw as any as KeyboardEvent; if (event.key === key && event.ctrlKey === ctrlKey) {