2 ms·
How about Ctrl+C? The meaning is unambiguous: If there is a selection, Ctrl+C is handled by the console host and copies the selection. If there is no selection,
by ygra 11y ago
How about Ctrl+C? The meaning is unambiguous: If there is a selection, Ctrl+C is handled by the console host and copies the selection. If there is no selection, Ctrl+C is passed on to the running program which then does whatever it likes with it (i.e. in many cases terminate itself).
- ZenoArrow 11y agoYour suggestion makes sense, but my previous question was referring to how Windows handles this. Do you know if it's possible to assign Ctrl+C to both operations for the Windows 10 command prompt?
- ygra 11y agoThat was a description of how Windows handles this. Basically, the current selection and those capabilities are part of the console host. Your application running in a console window has (to my knowledge) no idea of those features; it cannot tell whether there is a selection or not or what to do with it because they happen transparently a layer above your application (between your application and the window manager, essentially). So the question you're asking is a bit moot, in a way, considering that the answer is yes, because that's exactly the way it is. It cannot be any other way, as far as I can see.