Hello. How can I read several keys at the same time in the console? It is necessary for the game. Some keys control the first character, others control the second one.

  • The correct answer is no way. And why is it necessary at the same time? And with what time accuracy at the same time? - abalckin
  • @rishat, If you are given an exhaustive answer, mark it as correct (click on the check mark next to the selected answer). - Vitalina

1 answer 1

Create a handler in a separate thread. Pass all keystrokes to him. Depending on which key is pressed, the action does either one or another character.