aisk / pick

create curses based interactive selection list in the terminal
MIT License
721 stars 60 forks source link

quit using `q`, how to do it now that register_custom_handler is gone? #98

Closed kootenpv closed 1 month ago

kootenpv commented 1 year ago

Is there a way to achieve it?

I used to be able to do this:

picker.register_custom_handler(ord("q"), lambda _: sys.exit(0))

antonc42 commented 1 year ago

I would also like to know why this feature was removed and if there is a way to re-implement it. It was extremely useful being able to add custom actions for keys. The removal of this feature has made this module all but unusable for me.

bluenote10 commented 1 year ago

Same here. From a UX perspective, the selection gives the feeling of being locked in. I'm instinctively pressing q or ESC all the time, so having some means of aborting would be really nice.

kootenpv commented 1 year ago

Yup still hoping for the return of q

FelixFourcolor commented 1 year ago

I support this proposal

kootenpv commented 1 year ago

@wong2 perhaps rolling back to the earlier version is an option? why was there an upgrade that removed perfect functionality?

FelixFourcolor commented 1 year ago

I just created a fork that enables quitting with q, and is currently in pull request.

LeLunZ commented 4 months ago

Same. I am also wondering why such important functionality was removed?

aisk commented 1 month ago

There is a new approch to quit the pick with q by #126, and shipped in v2.4.0b1. Thanks @Henri-ColibrITD for the contribution!