release: v4.1.0

This commit is contained in:
Amruth Pillai
2024-05-05 14:55:06 +02:00
parent 68252c35fc
commit e87b05a93a
282 changed files with 11461 additions and 10713 deletions

View File

@ -20,8 +20,13 @@ export const KeyboardShortcut = ({
const { value, setValue } = useBoolean(defaultValue);
useEffect(() => {
const onKeyDown = (e: KeyboardEvent) => e.key === "Control" && setValue(true);
const onKeyUp = (e: KeyboardEvent) => e.key === "Control" && setValue(false);
const onKeyDown = (e: KeyboardEvent) => {
e.key === "Control" && setValue(true);
};
const onKeyUp = (e: KeyboardEvent) => {
e.key === "Control" && setValue(false);
};
document.addEventListener("keydown", onKeyDown);
document.addEventListener("keyup", onKeyUp);