Hello Guys, I am trying to make an application in C# which needs to detect if user touched keyboard on any key. I do not care which key was pressed, I only need to know that it was pressed so my software pause its activity for some time while keyboard is in use.
I learnt that it is easy to see if key modifiers were used just simply doing
if (ModifierKeys != 0) { Ticks = 0; } //resetting timer for inactivity if modifier key is pressed
but I can not find anything this simple for detecting all keys with only a couple lines of code. Maybe a better way is intercepting interrupt from keyboard if this is possible?
Could someone help please?
I learnt that it is easy to see if key modifiers were used just simply doing
if (ModifierKeys != 0) { Ticks = 0; } //resetting timer for inactivity if modifier key is pressed
but I can not find anything this simple for detecting all keys with only a couple lines of code. Maybe a better way is intercepting interrupt from keyboard if this is possible?
Could someone help please?