Skip to content

Commit

Permalink
Change search hotkey so it does not replace the native find (#2078)
Browse files Browse the repository at this point in the history
* Change search hotkey so it does not replace the native find

* Add bacxk ctrl/cmd + f to electron
  • Loading branch information
belcherj authored May 14, 2020
1 parent 4e0819e commit 69e5085
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ export const App = connect(
return false;
}

if (cmdOrCtrl && !shiftKey && 'KeyF' === code) {
if (
(cmdOrCtrl && shiftKey && 'KeyS' === code) ||
(isElectron && cmdOrCtrl && !shiftKey && 'KeyF' === code)
) {
this.props.focusSearchField();

event.stopPropagation();
Expand Down
4 changes: 3 additions & 1 deletion lib/dialogs/keybindings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ export class AboutDialog extends Component<DispatchProps> {
</Keys>
</li>
<li>
<Keys keys={[CmdOrCtrl, 'F']}>Focus search field</Keys>
<Keys keys={[CmdOrCtrl, 'Shift', 'S']}>
Focus search field
</Keys>
</li>
<li>
<Keys keys={[CmdOrCtrl, 'G']}>
Expand Down

0 comments on commit 69e5085

Please sign in to comment.