diff --git a/src/components/profile-picker.tsx b/src/components/profile-picker.tsx index ef13bcbf..7a22a859 100644 --- a/src/components/profile-picker.tsx +++ b/src/components/profile-picker.tsx @@ -58,6 +58,28 @@ export const ProfilePicker = ({ { value: 'motorcycle', label: 'Motorcycle' }, ]; + const handleKeyDown = (event: React.KeyboardEvent, index: number) => { + if (event.key === 'ArrowRight') { + event.preventDefault(); + const next = (index + 1) % profiles.length; + const nextProfile = profiles[next]; + + if (nextProfile) { + handleUpdateProfile(nextProfile.value as Profile); + } + } + + if (event.key === 'ArrowLeft') { + event.preventDefault(); + const prev = (index - 1 + profiles.length) % profiles.length; + const prevProfile = profiles[prev]; + + if (prevProfile) { + handleUpdateProfile(prevProfile.value as Profile); + } + } + }; + return (