SFML community forums
Help => Window => Topic started by: Wolf 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):
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.
-
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 (https://github.com/SFML/SFML/pull/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 (https://github.com/SFML/SFML/issues/895), #897 (https://github.com/SFML/SFML/pull/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 (https://github.com/SFML/SFML/issues/7), http://en.sfml-dev.org/forums/index.php?topic=13692.0
-
The issue with sf::Keyboard::RAlt should be fixed in #922 (https://github.com/SFML/SFML/pull/922).