Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

SDL2: Can not switch IME to English state by pressing shift key #222

Open
snowyu opened this issue Jul 15, 2023 · 4 comments
Open

SDL2: Can not switch IME to English state by pressing shift key #222

snowyu opened this issue Jul 15, 2023 · 4 comments

Comments

@snowyu
Copy link
Contributor

snowyu commented Jul 15, 2023

No description provided.

@snowyu
Copy link
Contributor Author

snowyu commented Jul 16, 2023

  1. It is not possible to allow English input inside IME(press shift key) within the SDL2 app, can switch to another IME. This can only be switched outside the application.
  2. The candidate window cannot be displayed correctly under the input box.

@snowyu snowyu changed the title SDL2: No IME supports yet SDL2: Can not switch IME Jul 16, 2023
@snowyu snowyu changed the title SDL2: Can not switch IME SDL2: Can not switch IME to English state by pressing shift key Jul 16, 2023
@sfan5
Copy link
Member

sfan5 commented Jul 16, 2023

probably need to use this: https://wiki.libsdl.org/SDL2/SDL_SetTextInputRect

@snowyu
Copy link
Contributor Author

snowyu commented Jul 16, 2023

And It seems to intercept the shift key and cannot be passed to the IME.

@y5nw
Copy link
Contributor

y5nw commented Feb 9, 2024

  1. It is not possible to allow English input inside IME(press shift key) within the SDL2 app, can switch to another IME. This can only be switched outside the application.

This should be fixed by #285.

2. The candidate window cannot be displayed correctly under the input box.

This one is "fun".

I am not sure about your specific setup, but pressing the Shift key to switch the language does work for me (IBus + Intelligent Pinyin on Arch).

That said, one issue I do have that is possibly related is that my normal setup is to use Control+comma to switch between Chinese and English (*), in which case SDL (using a simple testing code) does emit the , text input event when I toggle between English/Chinese input. However, this does not seem any to affect other IM shortcuts (toggle halfwidth/fullwidth punctuation and toggle simplified/traditional variant)

(*) Note for others: Some input methods include the feature of switching between Chinese/English text input; this is different from (and not related to) the IME's feature of switching between input methods/keyboard layouts.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants