Page 1 of 1

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

Posted: Sun Apr 15, 2012 2:35 pm
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

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

Posted: Sun Apr 15, 2012 2:39 pm
by kikito
Have you tried using the unicode parameter? (the second parameter of love.keypressed, not the first)

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

Posted: Sun Apr 15, 2012 2:40 pm
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.

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

Posted: Sun Apr 15, 2012 2:51 pm
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?

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

Posted: Sun Apr 15, 2012 3:02 pm
by bartbes
You can't, it's not in 0.8.0.

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

Posted: Sun Apr 15, 2012 3:10 pm
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.

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

Posted: Sun Apr 15, 2012 3:19 pm
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.

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

Posted: Sun Apr 15, 2012 7:43 pm
by kanadezwo
It works.

Thankyou :)