You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When requesting user input multiple times, it would be nice to provide a way for the user to return to previous steps in case they've entered some wrong information.
Describe the solution you'd like
We could capture the ESC keypress during AnsiConsole.Prompt and set a variable, e.g. AnsiConsole.Prompt(prompt, out var cancelled) to indicate the user pressed escape. Or, the return value of AnsiConsole.Prompt could be null if the input was cancelled.
Describe alternatives you've considered
There are some incomplete code samples here that I've tried, but there are multiple issues with the code such as exceptions and formatting problems. It would be great if this was a native solution in Spectre.Console.
Please upvote 👍 this issue if you are interested in it.
The text was updated successfully, but these errors were encountered:
I did request some thing similar last year, but it did not go anywhere unfortunately. It would be nice to make keyboard handling extensible to support something like this:
where we could tell prompt to listen for several keys depending on user scenario, like Esc or Ctrl+C or q for exit, back key or help key etc.
Is your feature request related to a problem? Please describe.
When requesting user input multiple times, it would be nice to provide a way for the user to return to previous steps in case they've entered some wrong information.
Describe the solution you'd like
We could capture the ESC keypress during
AnsiConsole.Prompt
and set a variable, e.g.AnsiConsole.Prompt(prompt, out var cancelled)
to indicate the user pressed escape. Or, the return value ofAnsiConsole.Prompt
could benull
if the input was cancelled.Describe alternatives you've considered
There are some incomplete code samples here that I've tried, but there are multiple issues with the code such as exceptions and formatting problems. It would be great if this was a native solution in Spectre.Console.
Please upvote 👍 this issue if you are interested in it.
The text was updated successfully, but these errors were encountered: