Keyboard events do not react to non-english keys.

Issue #337 resolved
Former user created an issue

On my German keyboard love seems not to react to certain keypresses (For example the ß-key). I've took a look on the love source code, as far as I can tell you've hardcoded the SDL key-constants which love reacts to. Are there any key-constants for non-english buttons? Would it be possible to add them?

Comments (10)

  1. Former user Account Deleted

    same "problem" here

    ö, ä and ü also not working for me

    I've reported this ... loooong time ago .... in #love on freenode iirc

  2. Bart van Strien

    Unfortunately, this is not that easy to fix, focussing on the most common keys seems sane.

    I think you should be able to get these keys with the unicode (second) argument to the keypressed callback.

  3. Former user Account Deleted

    pls fix ^^

    or can you tell me how I can fix it?

    the function love.keypressed isn't called on this keys, so I can't get these keys with the unicode argument.

  4. Bart van Strien

    Is that with 0.7.2 or (current) 0.8.0? I remember allowing unbound keys to call keypressed.

  5. George Russell

    This also applies to Swedish keys (öåä) on OSX in Love 0.8.0

    Its a bit of a blocker to writing some classes of game (e.g. Swedish / English translating hangman!) in Love2D

  6. George Russell

    This patch against love 0.8.0 exposes the SDLK_WORLD_XX keys to love code as e.g.

    if key == 'WKEY4' then key = 'ä' end 

    It does not specify _what_ the keys represent, as that is presumably language and/or keyboard specific

  7. Log in to comment