diff --git a/CHANGELOG.md b/CHANGELOG.md index 9997cfe9..748cddef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ## [Unreleased] -- No changes since the latest release below. +- Accept 'h' and 'l' keys in `MultiSelect` vim_mode to current clear selection and select all. ## [0.7.0] - 2024-02-24 diff --git a/inquire/src/prompts/multiselect/action.rs b/inquire/src/prompts/multiselect/action.rs index e61a3fbf..ae1d7135 100644 --- a/inquire/src/prompts/multiselect/action.rs +++ b/inquire/src/prompts/multiselect/action.rs @@ -36,8 +36,10 @@ impl InnerAction for MultiSelectPromptAction { fn from_key(key: Key, config: &MultiSelectConfig) -> Option { if config.vim_mode { let action = match key { + Key::Char('h', KeyModifiers::NONE) => Some(Self::ClearSelections), Key::Char('k', KeyModifiers::NONE) => Some(Self::MoveUp), Key::Char('j', KeyModifiers::NONE) => Some(Self::MoveDown), + Key::Char('l', KeyModifiers::NONE) => Some(Self::SelectAll), _ => None, };