Skip to content

[Snowcap] Let captured input go through #374

@Ph4ntomas

Description

@Ph4ntomas

Snowcap have an internal subscription on keyboard events, but the events are filtered on the server side.

I would like the ability to handle some key events from the config, regardless of if a widget 'captured' it (the 'captured' flag could be sent so the config can the decide how to process the event.

For context:
I'm using a TextInput for my prompt (from #369).
The default behavior is that the TextInput captures keyboard inputs while focused.

I'd like to add the following behaviors:

  • Close the prompt on Escape => The first Escape is captured by the TextInput, which unfocus itself. The config is not notified of this change.
  • Close the prompt on Backspace if the field is empty => The BackSpace is always captured by the TextInput.

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