[Update] Prevent to register the same hotkey that is already in use.

This commit is contained in:
Sakamoto Shiina committed 2025-01-17 05:18:09 +09:00
1 parent 21235068f7
commit 3e23509e68
2 files changed
+32 -7

No files matched your search

@@ -20,7 +20,8 @@ export const HotkeysEntry = (props) => {
const updateHotkeys = (keys) => {
entryRef.current.blur();
props.setHotkeys({ [props.hotkey_id]: keys });
const result = props.setHotkeys({ [props.hotkey_id]: keys });
if (result === false) setDisplayValue("");
};
const processKey = (key) => {