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

Author Topic: event.key.code: LBracket / RBracket >> Windows and Ubuntu ..  (Read 9624 times)

0 Members and 1 Guest are viewing this topic.

HeinzK

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • ZwiAner
    • Email
deleted
« Last Edit: December 04, 2019, 08:26:29 am by HeinzK »
The trees, that obstruct the view on the forest, can be allowed to fall! (Die Bäume, die die Sicht auf einen Wald versperren, dürfen gefällt werden!)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: event.key.code: LBracket / RBracket >> Windows and Ubuntu ..
« Reply #1 on: May 07, 2012, 11:30:22 am »
Yeah, keyboard handling is not perfect, there's a task in the tracker for this issue. It will be improved in SFML 2.
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: event.key.code: LBracket / RBracket >> Windows and Ubuntu ..
« Reply #2 on: May 07, 2012, 12:34:32 pm »
Quote
do you have an idea how this will last long?
No ;D
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: event.key.code: LBracket / RBracket >> Windows and Ubuntu ..
« Reply #3 on: May 07, 2012, 02:12:01 pm »
I can see if a quick fix is possible. But as far as I remember, these 3 keys are supposed to work fine on Windows and Linux.
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: event.key.code: LBracket / RBracket >> Windows and Ubuntu ..
« Reply #4 on: May 07, 2012, 02:59:23 pm »
If you want someone to look at your code, first read this ;)
http://en.sfml-dev.org/forums/index.php?topic=5559.msg36368#msg36368
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: event.key.code: LBracket / RBracket >> Windows and Ubuntu ..
« Reply #5 on: May 07, 2012, 05:42:52 pm »
You should use constants from the sf::Keyboard::Key enum, instead of hard-coded numeric values. Do this in your post too: I don't know which keys 43 and 37 are ;)
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: event.key.code: LBracket / RBracket >> Windows and Ubuntu ..
« Reply #6 on: May 07, 2012, 05:49:05 pm »
About Windows:

- Left Alt has a special meaning: it steals focus from the application (I never remember what it does then); it has already been discussed, there is a simple workaround (by adding code to SFML), and it might officially be integrated to SFML in the future

- Right-Alt (Alt Gr) has a special meaning too: it is a shortcut for Alt + Ctrl; don't ask me why, this is how things are defined on Windows
Laurent Gomila - SFML developer

 

anything