mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 00:10:01 +02:00
Merge 809560eaa3
into aada165021
This commit is contained in:
commit
7ce777634d
1 changed files with 41 additions and 1 deletions
|
@ -709,11 +709,16 @@ function zenGetDefaultShortcuts() {
|
|||
)
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return newShortcutList;
|
||||
}
|
||||
|
||||
class ZenKeyboardShortcutsVersioner {
|
||||
static LATEST_KBS_VERSION = 3;
|
||||
static LATEST_KBS_VERSION = 4;
|
||||
|
||||
constructor() {}
|
||||
|
||||
|
@ -768,6 +773,18 @@ class ZenKeyboardShortcutsVersioner {
|
|||
}
|
||||
|
||||
migrate(data, version) {
|
||||
// Explain: How to add shortcuts
|
||||
/*
|
||||
new KeyShortcut(
|
||||
'ID_OF_SHORTCUT',
|
||||
'KEYCODE',
|
||||
'',
|
||||
GROUP_OF_SHORTCUT,
|
||||
KeyShortcutModifiers.fromObject({ accel: true, alt: true }), //accel = Ctrl/Cmd, Alt = Alt/Option
|
||||
'code:NATIVE_CODE_FUNCTION()',
|
||||
'L10N_STRING_FOR_TRANSLATION'
|
||||
)
|
||||
*/
|
||||
if (version < 1) {
|
||||
// Migrate from 0 to 1
|
||||
// Here, we do a complet reset of the shortcuts,
|
||||
|
@ -812,6 +829,29 @@ class ZenKeyboardShortcutsVersioner {
|
|||
}
|
||||
}
|
||||
}
|
||||
data.push(
|
||||
// Added by gunir
|
||||
// Prev Tab Ctrl+Left
|
||||
new KeyShortcut(
|
||||
'zen-previous-tab',
|
||||
'VK_LEFT',
|
||||
'',
|
||||
ZEN_OTHER_SHORTCUTS_GROUP,
|
||||
KeyShortcutModifiers.fromObject({ accel: true }),
|
||||
"code:gBrowser.tabContainer.advanceSelectedTab(-1, true);",
|
||||
'zen-shortcut-previous-tab'
|
||||
),
|
||||
// Next Tab Ctrl+Right
|
||||
new KeyShortcut(
|
||||
'zen-next-tab',
|
||||
'VK_RIGHT',
|
||||
'',
|
||||
ZEN_OTHER_SHORTCUTS_GROUP,
|
||||
KeyShortcutModifiers.fromObject({ accel: true }),
|
||||
"code:gBrowser.tabContainer.advanceSelectedTab(1, true);",
|
||||
'zen-shortcut-next-tab'
|
||||
)
|
||||
);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue