mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-05 17:36:34 +00:00
Fixing macOS keybind issues
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
13
src/dom/events/KeyHandlerEvent-cpp.patch
Normal file
13
src/dom/events/KeyHandlerEvent-cpp.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/dom/events/KeyEventHandler.cpp b/dom/events/KeyEventHandler.cpp
|
||||
index 3f3ca808e8..0828b37f51 100644
|
||||
--- a/dom/events/KeyEventHandler.cpp
|
||||
+++ b/dom/events/KeyEventHandler.cpp
|
||||
@@ -641,7 +641,7 @@ void KeyEventHandler::BuildModifiers(nsAString& aModifiers) {
|
||||
} else if (strcmp(token, "control") == 0) {
|
||||
mKeyMask |= cControl | cControlMask;
|
||||
} else if (strcmp(token, "accel") == 0) {
|
||||
- mKeyMask |= AccelKeyMask();
|
||||
+ mKeyMask |= cControl | cControlMask;
|
||||
} else if (strcmp(token, "access") == 0) {
|
||||
mKeyMask |= KeyToMask(LookAndFeel::GetMenuAccessKey());
|
||||
} else if (strcmp(token, "any") == 0) {
|
Reference in New Issue
Block a user