2

Im making a drum application and when i try to press two keys simultaneously (for example bass drum and crash cymbals), it does not work. by the way, im using window forms and keydowns for the drum pieces.

how can i do so in c#?

Ravi Y
  • 4,296
  • 2
  • 27
  • 38

1 Answers1

1

Since the KeyEventArgs only supplies a value of type Keys-Enumeration to your code, there is no way to get multiple keys via this value. The Keys-Enumeration is not usable for bitwise operations needed to get the keys out of the enum. To get multiple keys, you have to look up via WinApi, as described in other threads and linked in the comments.

CShark
  • 1,413
  • 15
  • 25