How can I handle two buttons pressed simultaneously ('Ctrl' + 'C'), not in the WindowsForms application, but in console C# application?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I suspect you want to set Console.TreatCtrlCAsInput
to true
. (Assuming you don't want this to terminate the app.)
回答2:
Check out Console.TreatControlCAsInput property;
Gets or sets a value indicating whether the combination of the Control modifier key and C console key (Ctrl+C) is treated as ordinary input or as an interruption that is handled by the operating system.