diff --git a/src/js/background/constants.js b/src/js/background/constants.js
index cec58c09..e747693a 100644
--- a/src/js/background/constants.js
+++ b/src/js/background/constants.js
@@ -59,7 +59,10 @@ define([
MoveTabLeft: "moveTabLeft",
MoveTabRight: "moveTabRight",
CopyURL: "copyURL",
- CopyTitleURL: "copyTitleURL"
+ CopyTitleURL: "copyTitleURL",
+ SelectPreviousItem: "selectPreviousItem",
+ SelectNextItem: "selectNextItem",
+ EscapeBehavior: "escapeBehavior",
}
}));
});
diff --git a/src/js/background/get-default-settings.js b/src/js/background/get-default-settings.js
index 14e95009..547c1048 100644
--- a/src/js/background/get-default-settings.js
+++ b/src/js/background/get-default-settings.js
@@ -9,7 +9,10 @@ define([
[k.Shortcuts.MoveTabLeft]: "ctrl+[",
[k.Shortcuts.MoveTabRight]: "ctrl+]",
[k.Shortcuts.CopyURL]: "mod+c",
- [k.Shortcuts.CopyTitleURL]: "mod+shift+c"
+ [k.Shortcuts.CopyTitleURL]: "mod+shift+c",
+ [k.Shortcuts.SelectPreviousItem]: "ctrl+p",
+ [k.Shortcuts.SelectNextItem]: "ctrl+n",
+ [k.Shortcuts.EscapeBehavior]: "",
};
// we can't use cmd+W on Mac to close the tab selected in the menu
// because the browser intercepts that and closes the current tab, so
diff --git a/src/js/options/keyboard-shortcuts.js b/src/js/options/keyboard-shortcuts.js
index 6370ead4..eb6bf480 100644
--- a/src/js/options/keyboard-shortcuts.js
+++ b/src/js/options/keyboard-shortcuts.js
@@ -107,7 +107,22 @@ define([
id: k.Shortcuts.CopyTitleURL,
label: Copy the title and URL of the selected item,
validate: validateSomeModifier
- }
+ },
+ {
+ id: k.Shortcuts.SelectPreviousItem,
+ label: Select the previous item.,
+ validate: validateSomeModifier
+ },
+ {
+ id: k.Shortcuts.SelectNextItem,
+ label: Select the next item.,
+ validate: validateSomeModifier
+ },
+ {
+ id: k.Shortcuts.EscapeBehavior,
+ label: Act as another escape key.,
+ validate: validateSomeModifier
+ },
],
fixed: [
{
diff --git a/src/js/popup/shortcuts/popup-shortcuts.js b/src/js/popup/shortcuts/popup-shortcuts.js
index 4bbabdf5..9c1e6d1f 100644
--- a/src/js/popup/shortcuts/popup-shortcuts.js
+++ b/src/js/popup/shortcuts/popup-shortcuts.js
@@ -42,7 +42,10 @@ define([
[k.Shortcuts.MoveTabLeft]: event => moveTab(-1, event.shiftKey),
[k.Shortcuts.MoveTabRight]: event => moveTab(1, event.shiftKey),
[k.Shortcuts.CopyURL]: () => self.copyItemURL(selectedTab(), false),
- [k.Shortcuts.CopyTitleURL]: () => self.copyItemURL(selectedTab(), true)
+ [k.Shortcuts.CopyTitleURL]: () => self.copyItemURL(selectedTab(), true),
+ [k.Shortcuts.SelectPreviousItem]: () => self.modifySelected(-1),
+ [k.Shortcuts.SelectNextItem]: () => self.modifySelected(1),
+ [k.Shortcuts.EscapeBehavior]: event => self.clearQuery(event.target.value),
};
const ShiftShortcuts = {
[k.Shortcuts.MoveTabLeft]: 1,