mikaelmello / inquire

A Rust library for building interactive prompts
https://docs.rs/inquire
MIT License
1.71k stars 72 forks source link

Alt+{left, right, backspace} support #219

Open samuela opened 5 months ago

samuela commented 5 months ago

Is your feature request related to a problem? Please describe. It is generally expected that shortcuts like Alt+{left, right, backspace}, ctrl+w, ctrl+a, ctrl+e, and so forth work for text inputs in the terminal.

Describe the solution you'd like These standard keyboard shortcuts to be implemented.

Describe alternatives you've considered Some discussion around custom shortcuts has transpired in https://github.com/mikaelmello/inquire/issues/70. Could be technically synergetic.

Additional context n/a

mikaelmello commented 5 months ago

hey @samuela,

what behaviour do you expect from each of these shortcuts? asking because I really don't know what is the convention for alt+[keys] you mentioned for example 😄

samuela commented 5 months ago

Here's what the Alt+{left, right, backspace} shortcuts do in my terminal:

https://github.com/mikaelmello/inquire/assets/226872/80cae3ef-e337-4e39-985a-91c26a685dc1

polarove commented 1 month ago

Here's what the Alt+{left, right, backspace} shortcuts do in my terminal:

Screen.Recording.2024-01-14.at.5.32.26.PM.mov

They are ctrl + {left, right, backspace} in my terminal on windows 11