Skip to content

Commit

Permalink
Fix / and ? key shortcuts suddenly not working
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeaun committed Jan 9, 2024
1 parent 5b0d6dd commit c47687e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/keyboard-shortcuts-help.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default memo(function KeyboardShortcutsHelp() {
}

useHotkeys(
'?, shift+?',
'?, shift+?, shift+slash',
(e) => {
console.log('help');
states.showKeyboardShortcutsHelp = true;
Expand Down
2 changes: 1 addition & 1 deletion src/components/search-command.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default memo(function SearchCommand({ onClose = () => {} }) {
const searchFormRef = useRef(null);

useHotkeys(
'/',
['Slash', '/'],
(e) => {
setShowSearch(true);
setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function Search({ columnMode, ...props }) {
}, [q, type, instance]);

useHotkeys(
'/',
['/', 'Slash'],
(e) => {
searchFormRef.current?.focus?.();
},
Expand Down

0 comments on commit c47687e

Please sign in to comment.