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

Author Topic: SFML 2 EnableKeyRepeat shows no effect  (Read 2887 times)

0 Members and 1 Guest are viewing this topic.

DaysShadow

  • Newbie
  • *
  • Posts: 6
    • View Profile
SFML 2 EnableKeyRepeat shows no effect
« on: July 08, 2011, 08:00:30 pm »
I dont know if it is an issue or a fault by myself but using Keyboard.EnableKeyRepeat( false ) once and asking Keys via Keyboard.IsKeyPressed( Keyboard.Key.TheKey ) in the main loop does not work like i expected it, it's just like with key repeat set to true.

With KeyRepeat set to false a IsKeyPressed( Key ) call should only return true one time if the key wasn't  released after that, shouldn't it?

I hope anyone can help here.

Thanks.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 2 EnableKeyRepeat shows no effect
« Reply #1 on: July 08, 2011, 09:06:44 pm »
Key repeat is only for KeyPressed events (that's why it's in Window, not Keyboard).
Laurent Gomila - SFML developer

DaysShadow

  • Newbie
  • *
  • Posts: 6
    • View Profile
SFML 2 EnableKeyRepeat shows no effect
« Reply #2 on: July 08, 2011, 09:12:10 pm »
Ah ok, so i have to write something myself, thank you.
Fast as always :)

 

anything