prompts
prompts copied to clipboard
Select toggle options via "h" and "l"
Is your feature request related to a problem?
For example, when running npm init svelte@next
(using prompts
), you are asked to select from a list which can be navigated via j and k. After that, you are given a toggle that can only be navigated via tab or arrow keys. It would be lovely to toggle in a vim-like way similar to navigating the list items.
Describe the solution you'd like
Select toggle options via h (left) and l (right)
Describe alternatives you've considered
Using tab / arrow keys for toggles is fine, but does break the flow when you move from a list (where j/k are usable).
Came here with the same idea. Maybe in utils/action.js, instead of
if (key.name === 'right') return 'right';
if (key.name === 'left') return 'left';
it could be
if (['right', 'l'].includes(key.name)) return 'right';
if (['left', 'h'].includes(key.name)) return 'left';