Merge pull request #9 from HarryHeres/fix/change-tab-workspace-duplicates

Probably a fix for macOS keybinds
This commit is contained in:
mauro 🤙 2024-09-09 22:20:55 +02:00 committed by GitHub
commit 6ab00d24f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -200,7 +200,10 @@ var gZenKeyboardShortcuts = {
},
_saveShortcuts() {
Services.prefs.setStringPref(kZKSStorageKey, JSON.stringify(this._savedShortcuts));
Services.prefs.setStringPref(
kZKSStorageKey,
JSON.stringify(this._savedShortcuts),
);
},
_parseDefaultShortcut(shortcut) {
@ -219,7 +222,9 @@ var gZenKeyboardShortcuts = {
_addDefaultShortcuts() {
for (let action in kZenDefaultShortcuts) {
if (!this._savedShortcuts[action]) {
this._savedShortcuts[action] = this._parseDefaultShortcut(kZenDefaultShortcuts[action]);
this._savedShortcuts[action] = this._parseDefaultShortcut(
kZenDefaultShortcuts[action],
);
}
}
},
@ -360,7 +365,7 @@ var gZenKeyboardShortcuts = {
shortCutToString(shortcut) {
let str = '';
if (shortcut.ctrl) {
str += AppConstants.platform == 'macosx' ? 'Cmd+' : 'Ctrl+';
str += "Ctrl+";
}
if (shortcut.alt) {
str += 'Alt+';
@ -369,7 +374,7 @@ var gZenKeyboardShortcuts = {
str += 'Shift+';
}
if (shortcut.meta) {
str += 'Meta+';
str += AppConstants.platform == "macosx" ? "Cmd+" : "Meta+";
}
if (shortcut.keycode) {
str += shortcut.keycode;