CITGuru / PyInquirer

A Python module for common interactive command line user interfaces
MIT License
1.92k stars 236 forks source link

Require the user to press Enter for confirm type #48

Open stratacast opened 5 years ago

stratacast commented 5 years ago

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.

geyang commented 4 years ago

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