GeonBit.UI icon indicating copy to clipboard operation
GeonBit.UI copied to clipboard

Support different keyboard layout

Open vfrz opened this issue 7 years ago • 2 comments

Currently, GeonBit.UI supports only the american qwerty keyboard layout. The pressed key is translated to a char using some dirty "if" , I think this is not a viable solution, especially if we want to support multiple keyboard in our game.

The best option I found is to use the TextInput event on GameWindow class from MonoGame : https://github.com/MonoGame/MonoGame/blob/master/MonoGame.Framework/GameWindow.cs

Arrow keys, backspace still need to be handled with the current method.

I have done a fork, I'll try to make these changes and make a PR, but it's not that easy. I first need to understand how the InputHelper class work.

vfrz avatar Aug 25 '18 13:08 vfrz

Handling your whole game's input system through this small helper class is a bit out of its scope, especially as both Monogame and c# already have pretty comprehensive methods in place for that purpose.

(just my 2 cents, not the developer).

SerialKicked avatar Aug 27 '18 22:08 SerialKicked

You are totally right. I forgot to mention that I was talking only about the TextInput control.

vfrz avatar Aug 28 '18 06:08 vfrz