I saw this question and suggested that it would be trivial, but for the last 30 minutes I tried to figure it out and finally do something.
, dwCtrlWakeupMask CONSOLE_READCONSOLE_CONTROL. MSDN : " , ", mask? ULONG TCHAR - ? wchars, , .
:
https://groups.google.com/forum/#!topic/golang-codereviews/KSp37ITmcUg Go, , : 1 << '\t'. , !
, dwCtrlWakeupMask - ASCII, ReadConsole. | 1 << ctrl_char, ... , 32- , 1-31 () ( btw , , , , , , ).
, :
cReadControl.dwCtrlWakeupMask = (1 << '\t') | (1 << 0x08);
ReadConsole (\t) backspace (0x08).
, ctrl+ some_ascii_value, , a == 1. , ctrl+d is 4, ctrl+z - 26.
, , ctrl+d ctrl+z:
cReadControl.dwCtrlWakeupMask = (1 << 4) | (1 << 26);
, Linux read, ctrl+d, .
, , ; , . .... tbh, - ReadConsoleInput , .
, - . , >= 32, ... , , .
, wineconsole, , Windows, .
dwControlKeyState BY. ( , ), , . , , ReadConsole 32, numlock . 48, numlock , shift + tab ( numlock). .
MSDN, IMO , !