Hello, C# Ladies and Guys,
I'm needing a generic ReadKey() method (in C#) that is able to read chars as keys like arrows or Ctrl. I know the Console.ReadKey() method but it is from the Console app type, I need one method that is independent on the project type. Yes, I already searched the web for "low level read key C#", and found some code examples, but with a few errors, or another with WPF target, and well, then I thought that it might be a good option to come here to ask for help to the experts. This is not a "gimme the codez" request, where the mystery is a logical algorithm and I don't want to get tired by using my brain, but a technical question about code I have no idea nor I used ever. Actually, it would be quite enough if you could give me any guidance on how/where I can find this code which should works generically independently of the project type.
The return type would be like ConsoleKeyInfo, which has a KeyChar and a Key members (if I remember correctly), that holds the char and the raw key respectively.
I will appreciate your help very much,
Thank you!
Regards
Pablo
I'm needing a generic ReadKey() method (in C#) that is able to read chars as keys like arrows or Ctrl. I know the Console.ReadKey() method but it is from the Console app type, I need one method that is independent on the project type. Yes, I already searched the web for "low level read key C#", and found some code examples, but with a few errors, or another with WPF target, and well, then I thought that it might be a good option to come here to ask for help to the experts. This is not a "gimme the codez" request, where the mystery is a logical algorithm and I don't want to get tired by using my brain, but a technical question about code I have no idea nor I used ever. Actually, it would be quite enough if you could give me any guidance on how/where I can find this code which should works generically independently of the project type.
The return type would be like ConsoleKeyInfo, which has a KeyChar and a Key members (if I remember correctly), that holds the char and the raw key respectively.
I will appreciate your help very much,
Thank you!
Regards
Pablo