SFML community forums
Bindings - other languages => DotNet => Topic started by: Gonzilla on June 12, 2012, 04:00:33 pm
-
How can I detect if the user press the circumflex-key [^]?
When I press the [^]-Key I got following Code:
{[KeyEventArgs] Code(BackSlash) Alt(False) Control(False) Shift(False) System(False)}
The other dead keys like the ยด (LBrackets) and ` (RBrackets) working fine.
-
Why do you want to detect these keys?
-
Unfortunatly SFML isn't able to detect all possible key combinations with all the diffrent keyboard layouts.
I guess you'll have to find another way if you need to use the [^] key.
Additionally it could be helpfull if you'd tell us which keyboard layout you're using.
-
@Laurent:
In many games you can show a game console with that key. I would like to have a such functionality in my game too.
@eXpl0it3r:
I use the QWERTZ / german layout.
But I see "the problem":
http://en.wikipedia.org/wiki/Keyboard_layout#United_States (http://en.wikipedia.org/wiki/Keyboard_layout#United_States) the key is tilde
http://en.wikipedia.org/wiki/Keyboard_layout#Austria_and_Germany (http://en.wikipedia.org/wiki/Keyboard_layout#Austria_and_Germany) the key is circumflex
This explaine why it work with some games, but how they are "transforming" the keys that they work with us and german layout?
-
Keyboard layouts are indeed not handled perfectly.
https://github.com/SFML/SFML/issues/7
-
Ah okay, already reported ;) Maybe this article help you with this problem http://www.luminance.org/blog/gruedorf/2009/08/14/supporting-alternate-keyboard-layouts-in-xna-games (http://www.luminance.org/blog/gruedorf/2009/08/14/supporting-alternate-keyboard-layouts-in-xna-games). Although it is about XNA but maybe it helps.