◐ Shell
clean mode source ↗

gh-138577: Fix keyboard shortcuts in getpass with echo_char by CuriousLearner · Pull Request #141597 · python/cpython

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.

@CuriousLearner

picnixz

@CuriousLearner

picnixz

picnixz

vstinner

Co-authored-by: Victor Stinner <vstinner@python.org>

vstinner

@CuriousLearner

maurycy added a commit to maurycy/cpython that referenced this pull request

Mar 30, 2026

clin1234 pushed a commit to clin1234/cpython that referenced this pull request

Apr 16, 2026
…thon#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>

ljfp pushed a commit to ljfp/cpython that referenced this pull request

Apr 25, 2026
…thon#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>