spectre.console
spectre.console copied to clipboard
Esc Key to exit selection
There is an "Abort" input selection, but it is not used. https://github.com/spectreconsole/spectre.console/blob/eb6a9d8d047266b1317cdbed87c35f68996b9f0f/src/Spectre.Console/Prompts/List/ListPromptInputResult.cs#L8
Optionally tie that to the Esc Key, so that you can have nested menus.
Please upvote :+1: this issue if you are interested in it.
I would like to try out this one!
Absolutely. Knock yourself out! 😄
Just to clarify on the scope of this, is all that is needed here to simply be returning this input result or also to do some handling of the escape case? And also is this abort wanted as a return option for all prompts or just the multi selection as I see that nesting was mentioned?
I have a menu list, which links to further menus, so you can drill down to the option you want. At the moment, there is no way to go back to the previous menu, unless you add "back" as a menu item. Ideally, I would like to capture the Esc key.
@0xStuart I've accomplished this by using the IAnsiConsole
everywhere, and decorating the input with my implementation that intercepts keys globally.