Skip to content

Commit

Permalink
Revert "記録するホットキーはレートリミット式にする"
Browse files Browse the repository at this point in the history
This reverts commit 40a7509.
  • Loading branch information
kakkokari-gtyih committed Jul 9, 2024
1 parent 33523d8 commit bdac342
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions packages/frontend/src/scripts/hotkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,24 +131,14 @@ const matchPatterns = (ev: KeyboardEvent, action: Action) => {
});
};

let lastHotKeyStoreTimer: number | null = null;

const storePattern = (ev: KeyboardEvent, callback: CallbackFunction) => {
if (lastHotKeyStoreTimer != null) {
clearTimeout(lastHotKeyStoreTimer);
}

latestHotkey = {
which: [ev.key.toLowerCase()],
ctrl: ev.ctrlKey || ev.metaKey,
alt: ev.altKey,
shift: ev.shiftKey,
callback,
};

lastHotKeyStoreTimer = window.setTimeout(() => {
latestHotkey = null;
}, 500);
};

const parseKeyCode = (input?: string | null) => {
Expand Down

0 comments on commit bdac342

Please sign in to comment.