What does line-buffering do in windows console (as in setting console input mode)?
What are the purposes of the various other modes? (I read them on the windows console functions website but some of them are downright confounding)
And is there a mode to accept arrow keys and combined keys, such as alt+x (example only)?
And is there a mode to accept arrow keys and combined keys, such as alt+x (example only)?
Yes. See examples above. As to the line buffering thing, that's when you want the function you call to return after typing in a line and hitting [ENTER]. The examples above don't work like that.
Those examples of mine (the ones using WaitForMultipleObject() and WaitForSingleObject()) don't use buffered input. If you want the type of line input type of data entry as you would have with the C Runtime stdio gets() (get string) function, you would have to use the SetConsoleMode function with the flag for line input mode.
If you want to just capture individual INPUT_RECORDs you can use code like mine. There you should be able to filter for anything odd you wish such as alt, ctrl, shift whatever combinations. It takes lots of work to become familiar with these console functions. Here is a link you might want to look at...
I remember many years ago I downloaded piles of sample code from Microsoft on these console functions, but I don't have it anymore. One other thing...the PeekConsoleInput() function is particularly useful. Unlike ReadConsoleInput() it doesn't block; you can examine the key in the input record before deciding to 'read' it or not.
I wrote you a little program that shows line input (buffered type operation) mode. It just saves what you write into a lpBuffer variable, then outputs that line with WriteConsole after you hit the [ENTER] key. I set the read buffer to 128 bytes so don't enter a line longer than that. Also, whatever you type will be echoed to the screen as you type it.