]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-138577: Fix keyboard shortcuts in getpass with echo_char (#141597)
authorSanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
Mon, 30 Mar 2026 09:11:13 +0000 (05:11 -0400)
committerGitHub <noreply@github.com>
Mon, 30 Mar 2026 09:11:13 +0000 (11:11 +0200)
commit7f0c4f6a0b1d9a56fb8b915dcd0acd598a9d25e6
tree43de6f2b99a14afe8e60dd42b80f7fde8cb52807
parent2cf6a68f028da164bdb9b0ce8ad2cc9bf8f72750
gh-138577: Fix keyboard shortcuts in getpass with echo_char (#141597)

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>
Doc/library/getpass.rst
Lib/getpass.py
Lib/test/test_getpass.py
Misc/NEWS.d/next/Library/2025-11-15-23-14-30.gh-issue-138577.KbShrt.rst [new file with mode: 0644]