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

Author Topic: why can't i get the sf::Key::Subtract event?  (Read 2075 times)

0 Members and 1 Guest are viewing this topic.

pridefight

  • Newbie
  • *
  • Posts: 10
    • View Profile
why can't i get the sf::Key::Subtract event?
« on: December 30, 2011, 07:58:43 am »
Trust me,first, my code are copied from the tutorial of the official site, so there's definitely no problem of the code, secondly, i am able to get other key events, like any letters, numbers, escape. but it's strange when i press + or - (which are represented by sf::Key::Subtract and sf::Key::Add),nothing happens? anyone met the same problem?


(probem solved, it's a keyboard layout problem, thanks for your ans...i don't know why but i can't post reply here, so i answer you from here)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
why can't i get the sf::Key::Subtract event?
« Reply #1 on: December 30, 2011, 08:15:40 am »
What is your keyboard layout, and which operating system do you use?
Laurent Gomila - SFML developer

Neomex

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Email
why can't i get the sf::Key::Subtract event?
« Reply #2 on: January 01, 2012, 11:55:10 am »
It works with numpad keys, you were probably trying to use these next to backspace.
Also be sure to have Num Lock unpressed.

 

anything