MediatedCommunications / WindowsInput

Capture and Simulate Keyboard and Mouse Input
MIT License
111 stars 17 forks source link

How to enum/count the pressed keys #3

Closed I-NOZex closed 4 years ago

I-NOZex commented 4 years ago

Hi, I'm trying to get how many keys are pressed, but without success. Can you provide an example on how to accomplish that?

TonyValenti commented 4 years ago

Do you mean how many keys are pressed at the same time? I think the KeyboardState class will give you what you want. It captures the state of all keys on the keyboard.