Compare commits

..

No commits in common. "ee49db67754ca8648d847ab7b337f4de63ef629e" and "c187a8625f9ff2d4e18fc26e8d3cfb2659f60827" have entirely different histories.

View File

@ -111,22 +111,13 @@ function useKeyPress(
) {
useEffect(() => {
const listener = (eventRaw: Event) => {
if (ctrlKey) {
console.log(
'eventRaw',
eventRaw,
'callback',
callback,
'key',
key,
'ctrlKey',
ctrlKey
);
}
console.log('eventRaw', eventRaw);
console.log('callback', callback);
console.log('key', key);
console.log('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);
}
};