mirror of
https://github.com/python/cpython.git
synced 2026-05-06 04:37:33 -04:00
7f0c4f6a0b
When using getpass.getpass(echo_char='*'), keyboard shortcuts like Ctrl+U (kill line), Ctrl+W (erase word), and Ctrl+V (literal next) now work correctly by reading the terminal's control character settings and processing them in non-canonical mode. Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
5 lines
326 B
ReStructuredText
5 lines
326 B
ReStructuredText
:func:`getpass.getpass` with non-empty ``echo_char`` now handles keyboard shortcuts
|
|
including Ctrl+A/E (cursor movement), Ctrl+K/U (kill line), Ctrl+W (erase word),
|
|
and Ctrl+V (literal next) by reading the terminal's control character settings
|
|
and processing them appropriately in non-canonical mode. Patch by Sanyam Khurana.
|