diff --git a/src/app/daily/DailyPageClient.tsx b/src/app/daily/DailyPageClient.tsx index 8a9897e..f9ebf84 100644 --- a/src/app/daily/DailyPageClient.tsx +++ b/src/app/daily/DailyPageClient.tsx @@ -14,6 +14,7 @@ import { PendingTasksSection } from '@/components/daily/PendingTasksSection'; import { dailyClient } from '@/clients/daily-client'; import { Header } from '@/components/ui/Header'; import { getPreviousWorkday, formatDateLong, isToday, generateDateTitle, formatDateShort, isYesterday } from '@/lib/date-utils'; +import { useGlobalKeyboardShortcuts } from '@/hooks/useGlobalKeyboardShortcuts'; interface DailyPageClientProps { initialDailyView?: DailyView; @@ -85,6 +86,13 @@ export function DailyPageClient({ await refreshDailyDates(); }; + // Raccourcis clavier globaux pour la page Daily + useGlobalKeyboardShortcuts({ + onNavigatePrevious: goToPreviousDay, + onNavigateNext: goToNextDay, + onGoToToday: goToToday + }); + const handleToggleCheckbox = async (checkboxId: string) => { await toggleCheckbox(checkboxId); }; diff --git a/src/app/kanban/KanbanPageClient.tsx b/src/app/kanban/KanbanPageClient.tsx index f7432c0..c47413f 100644 --- a/src/app/kanban/KanbanPageClient.tsx +++ b/src/app/kanban/KanbanPageClient.tsx @@ -12,6 +12,7 @@ import { CreateTaskForm } from '@/components/forms/CreateTaskForm'; import { MobileControls } from '@/components/kanban/MobileControls'; import { DesktopControls } from '@/components/kanban/DesktopControls'; import { useIsMobile } from '@/hooks/useIsMobile'; +import { useGlobalKeyboardShortcuts } from '@/hooks/useGlobalKeyboardShortcuts'; interface KanbanPageClientProps { initialTasks: Task[]; @@ -55,6 +56,19 @@ function KanbanPageContent() { setIsCreateModalOpen(false); }; + // Raccourcis clavier globaux pour la page Kanban + useGlobalKeyboardShortcuts({ + onCreateTask: () => setIsCreateModalOpen(true), + onToggleFilters: handleToggleFilters, + onToggleCompactView: handleToggleCompactView, + onToggleSwimlanes: handleToggleSwimlanes, + onOpenSearch: () => { + // Focus sur le champ de recherche dans les contrôles desktop + const searchInput = document.querySelector('input[placeholder*="Rechercher"]') as HTMLInputElement; + searchInput?.focus(); + } + }); + return (