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

Author Topic: Problems regarding keyboard input  (Read 3399 times)

0 Members and 1 Guest are viewing this topic.

Wolf

  • Newbie
  • *
  • Posts: 1
    • View Profile
Problems regarding keyboard input
« on: June 23, 2015, 02:50:31 pm »
I've run into a few problems regarding detecting keyboard input via the KeyPressed event.
  • On the international English keyboard layout, that uses AltGr (the right Alt key) to input non-English characters (such as 'ä', 'å', etc), the right Alt key is detected as sf::Keyboard::Unknown rather than sf::Keyboard::RAlt. However, this works fine on the standard US layout.
  • The numpad number keys do not work regardless of the keyboard layout, whether num lock is enabled or not. They all return sf::Keyboard::Unknown.
  • Switching between keyboard layouts while the game is open does not work, and trying to do so produces the following output (only once):
    Quote
    X Extensions:
       Generic Event Extension - First event: 0
       SHAPE - First event: 64
       MIT-SHM - First event: 65
       XInputExtension - First event: 66
       XTEST - First event: 0
       BIG-REQUESTS - First event: 0
       SYNC - First event: 83
       XKEYBOARD - First event: 85
       XC-MISC - First event: 0
       SECURITY - First event: 86
       XFIXES - First event: 87
       RENDER - First event: 0
       RANDR - First event: 89
       XINERAMA - First event: 0
       Composite - First event: 0
       DAMAGE - First event: 91
       MIT-SCREEN-SAVER - First event: 92
       DOUBLE-BUFFER - First event: 0
       RECORD - First event: 0
       DPMS - First event: 0
       Present - First event: 0
       DRI3 - First event: 0
       X-Resource - First event: 0
       XVideo - First event: 93
       XVideo-MotionCompensation - First event: 0
       XFree86-VidModeExtension - First event: 0
       XFree86-DGA - First event: 95
       DRI2 - First event: 102
       GLX - First event: 104
       SGI-GLX - First event: 104
    Unhandled event type: 85
    Report this to the SFML maintainers if possible
  • On layouts that use scripts other than Latin (such as Greek, Ukrainian, etc) any letter keys return sf::Keyboard::Unknown, while in my opinion they should return the keys corresponding to the US layout. For example pressing the 'ц' key on the Ukrainian layout should return sf::Keyboard::W, because the 'ц' key is located at the same key as the US 'w'.
I'm using Linux, Xubuntu 14.04, with IBus for multilingual input.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Problems regarding keyboard input
« Reply #1 on: June 23, 2015, 04:30:08 pm »
On the international English keyboard layout, that uses AltGr (the right Alt key) to input non-English characters (such as 'ä', 'å', etc), the right Alt key is detected as sf::Keyboard::Unknown rather than sf::Keyboard::RAlt. However, this works fine on the standard US layout.
Will have to look into this.
The numpad number keys do not work regardless of the keyboard layout, whether num lock is enabled or not. They all return sf::Keyboard::Unknown.
#910
Switching between keyboard layouts while the game is open does not work, and trying to do so produces the following output (only once):
#895, #897
On layouts that use scripts other than Latin (such as Greek, Ukrainian, etc) any letter keys return sf::Keyboard::Unknown, while in my opinion they should return the keys corresponding to the US layout. For example pressing the 'ц' key on the Ukrainian layout should return sf::Keyboard::W, because the 'ц' key is located at the same key as the US 'w'.
#7, http://en.sfml-dev.org/forums/index.php?topic=13692.0
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Problems regarding keyboard input
« Reply #2 on: July 14, 2015, 02:08:11 pm »
The issue with sf::Keyboard::RAlt should be fixed in #922.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

 

anything