mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 17:16:26 +01:00
Fix / and ? key shortcuts suddenly not working
This commit is contained in:
parent
5b0d6dd58b
commit
c47687e2e4
3 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ export default memo(function KeyboardShortcutsHelp() {
|
||||||
}
|
}
|
||||||
|
|
||||||
useHotkeys(
|
useHotkeys(
|
||||||
'?, shift+?',
|
'?, shift+?, shift+slash',
|
||||||
(e) => {
|
(e) => {
|
||||||
console.log('help');
|
console.log('help');
|
||||||
states.showKeyboardShortcutsHelp = true;
|
states.showKeyboardShortcutsHelp = true;
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default memo(function SearchCommand({ onClose = () => {} }) {
|
||||||
const searchFormRef = useRef(null);
|
const searchFormRef = useRef(null);
|
||||||
|
|
||||||
useHotkeys(
|
useHotkeys(
|
||||||
'/',
|
['Slash', '/'],
|
||||||
(e) => {
|
(e) => {
|
||||||
setShowSearch(true);
|
setShowSearch(true);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
|
@ -174,7 +174,7 @@ function Search({ columnMode, ...props }) {
|
||||||
}, [q, type, instance]);
|
}, [q, type, instance]);
|
||||||
|
|
||||||
useHotkeys(
|
useHotkeys(
|
||||||
'/',
|
['/', 'Slash'],
|
||||||
(e) => {
|
(e) => {
|
||||||
searchFormRef.current?.focus?.();
|
searchFormRef.current?.focus?.();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue