feat: add keyboard shortcut help modal triggered by ? key
This commit is contained in:
@@ -41,6 +41,12 @@ export function useKeyboardShortcuts(): void {
|
||||
document.dispatchEvent(new CustomEvent("close-all-modals"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.key === "?" || (e.shiftKey && e.key === "/")) {
|
||||
e.preventDefault();
|
||||
document.dispatchEvent(new CustomEvent("open-shortcut-help"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener("keydown", handleKeyDown);
|
||||
|
||||
Reference in New Issue
Block a user