Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disabling IME shortcuts #2918

Open
1 of 11 tasks
divVerent opened this issue Feb 29, 2024 · 2 comments
Open
1 of 11 tasks

Allow disabling IME shortcuts #2918

divVerent opened this issue Feb 29, 2024 · 2 comments

Comments

@divVerent
Copy link
Contributor

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

What feature would you like to be added?

See divVerent/aaaaxy#341 - it'd be nice if games that contain no text input could globally disable all IME shortcuts.

Why is this needed?

Right now, in AAAAXY, if the player by accident hits the Kanji key in-game (in the concrete case together with Shift), further space keypresses (which is for the jump action) are silently ignored until the Kanji key is pressed again.

As a current workaround, the game also supports other key mappings, but it'd be really nice if I could just disable the handling of the key.

I think what I want is to call this Windows API function:

https://learn.microsoft.com/en-us/windows/win32/api/imm/nf-imm-immdisableime

However, it requires to be called before any window is created, and Ebitengine already creates a window during its init() functions, so I couldn't find a reliable way to inject my own init() handler before any of Ebitengine's.

@hajimehoshi
Copy link
Owner

hajimehoshi commented Feb 29, 2024

  1. Do we have similar issues and solutions for other OSes?
  2. Doesn't this break compatibility for AppendInputChars?

@divVerent
Copy link
Contributor Author

divVerent commented Feb 29, 2024

  1. No idea - I cannot reproduce this on any of my systems. I asked the reporter to try to reproduce it with ebitengine's keyboard example - let's see then.

  2. Disabling IME should not fully break AppendInputChars, but limit it to a "non-IME" keyboard mode. Right now the implementation of Ebitengine doesn't even call any IME functions. But of course, as some Ebitengine games have input fields, I cannot seriously propose for Ebitengine to just globally disable IME.

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

No branches or pull requests

2 participants