Fixing macOS keybind issues

This commit is contained in:
HarryHeres
2024-09-10 13:26:55 +02:00
parent 76512840e3
commit faa9b2f763
2 changed files with 26 additions and 1 deletions

View File

@@ -704,7 +704,19 @@ var gZenCKSSettings = {
input.value = modifiers.toUserString() + shortcut;
if (!shortcut || shortcut === '') {
if (!['Control', 'Alt', 'Meta', 'Shift'].includes(event.key)) {
shortcut.key = event.key;
}
event.preventDefault();
gZenKeyboardShortcuts.setShortcut(this._currentAction, shortcut);
input.value = gZenKeyboardShortcuts.shortCutToString(shortcut);
input.classList.remove('zenCKSOption-input-not-set');
if (gZenKeyboardShortcuts.isValidShortcut(shortcut)) {
input.classList.remove('zenCKSOption-input-invalid');
} else {
input.classList.add('zenCKSOption-input-invalid');
return;
}