improve debug logging
This commit is contained in:
parent
c187a8625f
commit
f9f0b42473
@ -111,13 +111,20 @@ function useKeyPress(
|
||||
) {
|
||||
useEffect(() => {
|
||||
const listener = (eventRaw: Event) => {
|
||||
console.log('eventRaw', eventRaw);
|
||||
console.log('callback', callback);
|
||||
console.log('key', key);
|
||||
console.log('ctrlKey', 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) {
|
||||
console.log(`calling event for ${key} ${ctrlKey}`);
|
||||
callback(event);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user