Eryk Sun <eryk...@gmail.com> added the comment:

getpass() reads from the console via msvcrt.getwch(). This is a raw console 
read, so Ctrl+V is read as the SYN (0x16) control character. Only the following 
keys are handled specially by getpass: 

* Ctrl+C - raise KeyboardInterrupt
* Ctrl+H (backspace) - delete the previous character
* Ctrl+J (linefeed) and Ctrl+M (return) - return

getpass() behaves pretty much the same in a Linux terminal emulator, except 
Ctrl+H isn't backspace. 

Recent versions of the console host in Windows 10 have an option to support 
pasting via Ctrl+Shift+V, regardless of the input mode. This is pretty common 
in Unix terminal emulators as well. You can change this setting in the 
Properties->Options dialog for a particular window or shortcut, or the default 
setting in the Defaults->Options dialog. In the "HKCU\Console" registry key, 
the DWORD value name is "InterceptCopyPaste".

----------
nosy: +eryksun

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37426>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to