PyInquirer icon indicating copy to clipboard operation
PyInquirer copied to clipboard

Require the user to press Enter for confirm type

Open stratacast opened this issue 5 years ago • 1 comments

One thing that bothers me about this implementation of inquirer is how pressing y/n jumps immediately to the next prompt. I think for the last X decades we've been conditioned to type y/n and then hit enter. Can this be changed?

I think all it needs is to make changes to confirm.py by changing these decorators

@manager.registry.add_binding('y')
@manager.registry.add_binding('Y')

on lines 66,67 to

@manager.registry.add_binding('y', 'Enter')
@manager.registry.add_binding('Y', 'Enter')

And same for the No prompts on lines 60,61.

stratacast avatar Apr 26 '19 00:04 stratacast

there should be a more general way to implement key bindings.

geyang avatar Aug 07 '19 21:08 geyang