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. lightbee reporter

    I'm a Chinese.I can't input Chinese when love be ran.You should know that how important is it for me to type in Chinese.

  2. Bart van Strien

    So, what happens when you type? Does love.keypressed get called? Does love.textinput get called? Does love.textedited get called?

  3. 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.

    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.

  4. 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).

  5. 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.

  6. hackereric

    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.

  7. Log in to comment