Message346727
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". |
|
Date |
User |
Action |
Args |
2019-06-27 11:00:55 | eryksun | set | recipients:
+ eryksun, paul.moore, tim.golden, zach.ware, steve.dower, Atul Bagga |
2019-06-27 11:00:55 | eryksun | set | messageid: <1561633255.06.0.689810178385.issue37426@roundup.psfhosted.org> |
2019-06-27 11:00:55 | eryksun | link | issue37426 messages |
2019-06-27 11:00:54 | eryksun | create | |
|