Cannot call anything function of input method in linux

Issue #1220 closed
lightbee
created an issue

Love has been blocked the input method call of system. My OS is Ubuntu 16 LTS.

Comments (10)

  1. buckle2000

    I think @Lightbee means that LOVE intercepts input event, i.e. does not pass any input event to underlying OS and IME (if there is one). @Lightbee, Did you forget to call love.keyboard.setTextInput(true)? love.textinput and its members do get called (on my computer), but even if you called love.keyboard.setTextInput(true), CJK IME still will not work properly.

    This is a known problem of SDL2 that SDL will directly forward input event to OS (and then IME) without opening IME's "Candidate List" by default, which is essential to typing Chinese charaters. Developers can change this behavior. https://wiki.libsdl.org/Tutorials/TextInput

    Word Candidate

    A typical "word selection window". Typing in Pinyin is not a 1->1 match game. User must choose which word to use given that many Chinese words have the same pronunciation.

  2. buckle2000

    So the only thing LOVE does not do is to show candidate list, maybe a call to SDL_SetTextInputRect is enough. love.keyboard.setTextInput( enable, x, y, w, h ) is useless in 0.10.1 (I don't know why).

  3. Alex Szpakowski

    setTextInput(true, x, y, w, h) does call SDL_SetTextInputRect as well as SDL_StartTextInput. This sounds like either a SDL configuration problem when building it, or a problem in SDL's source code itself. I don't use Linux so I can't test it myself there.

  4. Ericlong

    You'd better build a in-game IME if this problem haven't been solved for a long time (imo). However, I tested it in both Windows and macOS, and it didn't happen.

  5. Log in to comment