Fix sidebar focus

This commit is contained in:
Gregory Schier
2024-02-27 10:33:20 -08:00
parent f9cd8d24a1
commit fd77437f59
2 changed files with 32 additions and 39 deletions

View File

@@ -83,8 +83,7 @@ export function useHotKey(
}
const key = normalizeKey(e.key, os);
currentKeys.current.add(normalizeKey(key, os));
currentKeys.current.add(key);
for (const [hkAction, hkKeys] of Object.entries(hotkeys) as [HotkeyAction, string[]][]) {
for (const hkKey of hkKeys) {
@@ -108,7 +107,7 @@ export function useHotKey(
return;
}
const key = normalizeKey(e.key, os);
currentKeys.current.delete(normalizeKey(key, os));
currentKeys.current.delete(key);
// Clear all keys if no longer holding modifier
// HACK: This is to get around the case of DOWN SHIFT -> DOWN : -> UP SHIFT -> UP ;