Support "produced characters" as hotkeys

"Produced characters" were not supported as hotkeys. I.e., using "!" as a hotkey was not possible.
This commit is contained in:
schroda
2026-05-13 18:57:36 +02:00
parent 4558863d19
commit bc66d52701
7 changed files with 508 additions and 486 deletions

View File

@@ -12,11 +12,11 @@ import IconButton from '@mui/material/IconButton';
import { useQueryParam, StringParam } from 'use-query-params';
import { useLocation } from 'react-router-dom';
import { useTheme } from '@mui/material/styles';
import { useHotkeys } from 'react-hotkeys-hook';
import { useLingui } from '@lingui/react/macro';
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
import { SearchTextField } from '@/base/components/inputs/SearchTextField.tsx';
import { SearchParam } from '@/base/Base.types.ts';
import { useHotkeys } from '@/lib/react-hotkeys-hook/useHotkeys.ts';
interface IProps {
isClosable?: boolean;
@@ -79,13 +79,9 @@ export const AppbarSearch: React.FunctionComponent<IProps> = (props) => {
}
};
useHotkeys(
'ctrl+f, F3',
() => {
updateSearchOpenState(true);
},
{ preventDefault: true },
);
useHotkeys('ctrl+f, F3', () => {
updateSearchOpenState(true);
});
if (isOpen) {
return (