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

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

View File

@@ -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) => {