mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 13:59:59 +02:00
Merge pull request #9 from HarryHeres/fix/change-tab-workspace-duplicates
Probably a fix for macOS keybinds
This commit is contained in:
commit
6ab00d24f8
1 changed files with 9 additions and 4 deletions
|
@ -200,7 +200,10 @@ var gZenKeyboardShortcuts = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_saveShortcuts() {
|
_saveShortcuts() {
|
||||||
Services.prefs.setStringPref(kZKSStorageKey, JSON.stringify(this._savedShortcuts));
|
Services.prefs.setStringPref(
|
||||||
|
kZKSStorageKey,
|
||||||
|
JSON.stringify(this._savedShortcuts),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
_parseDefaultShortcut(shortcut) {
|
_parseDefaultShortcut(shortcut) {
|
||||||
|
@ -219,7 +222,9 @@ var gZenKeyboardShortcuts = {
|
||||||
_addDefaultShortcuts() {
|
_addDefaultShortcuts() {
|
||||||
for (let action in kZenDefaultShortcuts) {
|
for (let action in kZenDefaultShortcuts) {
|
||||||
if (!this._savedShortcuts[action]) {
|
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) {
|
shortCutToString(shortcut) {
|
||||||
let str = '';
|
let str = '';
|
||||||
if (shortcut.ctrl) {
|
if (shortcut.ctrl) {
|
||||||
str += AppConstants.platform == 'macosx' ? 'Cmd+' : 'Ctrl+';
|
str += "Ctrl+";
|
||||||
}
|
}
|
||||||
if (shortcut.alt) {
|
if (shortcut.alt) {
|
||||||
str += 'Alt+';
|
str += 'Alt+';
|
||||||
|
@ -369,7 +374,7 @@ var gZenKeyboardShortcuts = {
|
||||||
str += 'Shift+';
|
str += 'Shift+';
|
||||||
}
|
}
|
||||||
if (shortcut.meta) {
|
if (shortcut.meta) {
|
||||||
str += 'Meta+';
|
str += AppConstants.platform == "macosx" ? "Cmd+" : "Meta+";
|
||||||
}
|
}
|
||||||
if (shortcut.keycode) {
|
if (shortcut.keycode) {
|
||||||
str += shortcut.keycode;
|
str += shortcut.keycode;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue