Skip to content

Handling Interrupt Signals (e.g., Ctrl+C) in Select and Other Dialoguer ActionsΒ #294

@silentEAG

Description

@silentEAG

using the latest version

dialoguer = { version = "0.11" }

using example-select, when everything operates as expected, it looks like this:

image

however, when I press Ctrl+C in Select, the following occurs:

image

This issue is not limited to the Select; it affects all actions that initially hide the cursor. The root of the problem seems to be the lack of a handler for keys like Ctrl+C.

Is it possible to provide a custom handler to manage these kinds of inputs? Any assistance or suggestions would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions