0

I'm writing a C# console program on Windows. Normally the program could be started by double clicking the icon in the File explorer, or typing its name in a command line. I hope to do some special task when the user double clicks the icon in the File explorer while holding down the ctrl or shift key. Is this possible? I know some program has this feature but I don't know how this is implemented or whether they are using C#.

Just a learner
  • 26,690
  • 50
  • 155
  • 234
  • What application has this feature? – ProgrammingLlama Oct 22 '20 at 02:38
  • If I remember correctly, in older versions of Tableau you can do such things. I'm sure there are other programs support this feature, I just can't remember their names. – Just a learner Oct 22 '20 at 02:43
  • 1
    Well your only option is to check if the key is down when you start. However this seems flakey, but i guess its doable – TheGeneral Oct 22 '20 at 03:01
  • Does this answer your question? [how To check if CTRL key is pressed in console application c#](https://stackoverflow.com/questions/33490168/how-to-check-if-ctrl-key-is-pressed-in-console-application-c-sharp) – Sinatr Oct 22 '20 at 07:13

0 Answers0