Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Two keys pressed at once - The first key pressed forgotten  (Read 2992 times)

0 Members and 1 Guest are viewing this topic.

Pyrius

  • Newbie
  • *
  • Posts: 39
    • View Profile
Two keys pressed at once - The first key pressed forgotten
« on: October 17, 2011, 01:45:26 am »
I'm working on a game, and I'm running into a problem where when I move the player by pressing the right arrow or the left arrow and then press some other button, the event of the first button that was pressed stops getting sent. I understand why this is happening, but is there any way around this? If you need me to post code please tell me, but I don't think posting any code is necessary right now.

Walker

  • Full Member
  • ***
  • Posts: 181
    • View Profile

Pyrius

  • Newbie
  • *
  • Posts: 39
    • View Profile
Two keys pressed at once - The first key pressed forgotten
« Reply #2 on: October 17, 2011, 07:31:31 pm »
Sorry it took me so long to respond, I was gone all day. Anyways, how would I check which key is pressed with sf::Input?

EDIT: Nevermind, I found out how you do it.

Code: [Select]

App.GetInput().IsKeyDown(Key::Left);