feat(gamepad): support gamepad input to paginate, closes #2432 (#3073)

This commit is contained in:
Huang Xin
2026-01-25 16:32:05 +01:00
committed by GitHub
parent 2c54e9ae2f
commit 563d3478ba
2 changed files with 200 additions and 0 deletions
@@ -9,6 +9,7 @@ import { useSettingsStore } from '@/store/settingsStore';
import { useBookDataStore } from '@/store/bookDataStore';
import { useReaderStore } from '@/store/readerStore';
import { useSidebarStore } from '@/store/sidebarStore';
import { useGamepad } from '@/hooks/useGamepad';
import { useTranslation } from '@/hooks/useTranslation';
import { SystemSettings } from '@/types/settings';
import { parseOpenWithFiles } from '@/helpers/openWith';
@@ -50,6 +51,7 @@ const ReaderContent: React.FC<{ ids?: string; settings: SystemSettings }> = ({ i
const [errorLoading, setErrorLoading] = useState(false);
useBookShortcuts({ sideBarBookKey, bookKeys });
useGamepad();
useEffect(() => {
if (isInitiating.current) return;