Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/js/background/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ define([
MoveTabLeft: "moveTabLeft",
MoveTabRight: "moveTabRight",
CopyURL: "copyURL",
CopyTitleURL: "copyTitleURL"
CopyTitleURL: "copyTitleURL",
SelectPreviousItem: "selectPreviousItem",
SelectNextItem: "selectNextItem",
EscapeBehavior: "escapeBehavior",
}
}));
});
5 changes: 4 additions & 1 deletion src/js/background/get-default-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 16 additions & 1 deletion src/js/options/keyboard-shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,22 @@ define([
id: k.Shortcuts.CopyTitleURL,
label: <span>Copy the <b>title and URL</b> of the selected item</span>,
validate: validateSomeModifier
}
},
{
id: k.Shortcuts.SelectPreviousItem,
label: <span>Select the <b>previous</b> item.</span>,
validate: validateSomeModifier
},
{
id: k.Shortcuts.SelectNextItem,
label: <span>Select the <b>next</b> item.</span>,
validate: validateSomeModifier
},
{
id: k.Shortcuts.EscapeBehavior,
label: <span>Act as another <b>escape</b> key.</span>,
validate: validateSomeModifier
},
],
fixed: [
{
Expand Down
5 changes: 4 additions & 1 deletion src/js/popup/shortcuts/popup-shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down