[solved] Keyboard events do not react to non-english keys

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
kanadezwo
Prole
Posts: 9
Joined: Tue Apr 10, 2012 4:47 pm

[solved] Keyboard events do not react to non-english keys

Post by kanadezwo »

Oi LÖVE-Community

Is it possible to fix the issue https://bitbucket.org/rude/love/issue/3 ... act-to-non with only rudimentary c skills? Where and what is the problem to fix it? I will try to fix the problem but I don't know what problem it is exactly. I will try to fix the problem but I don't know what problem it is exactly. So I don't know the "source" of the problem.

I really hate this type of bug, because I try to create a Login-Screen and usernames or passwords currently cannot contain umlauts (ö, ä, ü). I don't know how I can get this keys. The keypressed, keyreleased function is not called if I press these keys, so I can't get the keys with the 'unicode'-argument.

Is this a problem with SDL and not fixable?

Thanks for any hint.

- kanadezwo
Last edited by kanadezwo on Sun Apr 15, 2012 7:43 pm, edited 1 time in total.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Keyboard events do not react to non-english keys

Post by kikito »

Have you tried using the unicode parameter? (the second parameter of love.keypressed, not the first)
When I write def I mean function.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Keyboard events do not react to non-english keys

Post by bartbes »

This is a known bug and occurs only if your SDL build has the keys mapped (ironic, isn't it?). The best solution at the moment would make the key argument "unknown", but should have a valid unicode argument.
User avatar
kanadezwo
Prole
Posts: 9
Joined: Tue Apr 10, 2012 4:47 pm

Re: Keyboard events do not react to non-english keys

Post by kanadezwo »

kikito wrote:Have you tried using the unicode parameter? (the second parameter of love.keypressed, not the first)
love.keypressed and love.keyreleased isn't called -.-
bartbes wrote:This is a known bug and occurs only if your SDL build has the keys mapped (ironic, isn't it?). The best solution at the moment would make the key argument "unknown", but should have a valid unicode argument.
how can I do this?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Keyboard events do not react to non-english keys

Post by bartbes »

You can't, it's not in 0.8.0.
User avatar
kanadezwo
Prole
Posts: 9
Joined: Tue Apr 10, 2012 4:47 pm

Re: Keyboard events do not react to non-english keys

Post by kanadezwo »

What do I have to change at the source?

It should be possible to distribute my game with a customized LÖVE-Version if it is not possible with 0.8.0.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Keyboard events do not react to non-english keys

Post by bartbes »

It's at https://bitbucket.org/rude/love/src/4c6 ... .cpp#cl-93, if the first part of the if fails, you should set 'key' to love::keyboard::Keyboard::KEY_UNKNOWN. I think that should work.
User avatar
kanadezwo
Prole
Posts: 9
Joined: Tue Apr 10, 2012 4:47 pm

Re: Keyboard events do not react to non-english keys

Post by kanadezwo »

It works.

Thankyou :)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests