Suggested local keyboard layout support

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
u9_
Citizen
Posts: 54
Joined: Thu Oct 23, 2008 7:12 am

Suggested local keyboard layout support

Post by u9_ »

Yes, it would be nice if it were possible to get the character the operating system actually returned whenever you pressed a key.

(i have tried this myself using sdl and failed, so good luck :) )
User avatar
Borsty
Citizen
Posts: 66
Joined: Sun Oct 19, 2008 10:29 pm
Location: Hamburg, Germany
Contact:

Re: Suggested local keyboard layout support

Post by Borsty »

Yeah! Definatly! It's a pain to localize it everytime and to decode shiftstates etc :C
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Suggested local keyboard layout support

Post by rude »

Pretty sure this can't be done using SDL. It will have to be specially made or each platform.

Here's the function we need for Windows:
http://msdn.microsoft.com/en-us/library ... S.85).aspx

I hope someone else can find the equivalents for Linux and MacOSX.

Note: if this requires linkage to massive GTK or QT libraries, this function goes bye-bye.
u9_
Citizen
Posts: 54
Joined: Thu Oct 23, 2008 7:12 am

Re: Suggested local keyboard layout support

Post by u9_ »

There is some kind of localization support in the game TurboSliders, which also uses SDL. But I honestly don't know if the author coded several keyboard layouts manually and just automatically figured out what to use, or if he was able to get it from SDL. I will try and find out.

It will be a very nice feature to have when you want the user to enter his name for e.g. high-score purposes.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 195 guests