Open goaaats opened 3 years ago
Duplicate of #306 ?
Ah, that's true, but I guess it's missing the angle of input not working at all when toggling it in-game - might be wise to merge them
Can confirm this, CJK key events are not registering in the code. Confirmed with Korean Input Mode.
This should be good now
As far as keybinds being blocked goes, this is no longer an issue. However with Japanese IMEs, the Alt+` shortcut for toggling the IME doesn't get blocked and causes the console to open and close when you don't intend it to.
When it comes to actually typing CJK text, a bit more work is still left to be done. With Chinese and Japanese IMEs it's possible but the composition suggestion box doesn't appear (ideally it should appear but only when the player is actually supposed to type). With Korean IMEs it's impossible as every new complete character overwrites the last. Perhaps #306 should be reopened to focus on this though.
Describe the bug When using an IME input method like Japanese or Chinese, and switching to a mode with a dictionary(not "Direct Input"), s&box will fail to recognize any keybinds(walking, jumping, back to menu, etc) in-game.
This basically breaks all input and can be very confusing. For example, Japanese keyboards have a button to toggle between modes - so it is easy to accidentally enable this and have all input in the game stop working without any feedback as to why.
To Reproduce
Expected behavior Toggling IME modes should not be possible if no text field is selected. The IME mode should always be set to "Direct Input" when not typing any text.
Screenshots https://streamable.com/zacbaw (Observe me not being able to walk when the Hiragana symbol is shown)
Additional Context There's this article from 2009 that I've used before as a reference to fix this in a personal project, maybe it can be of help: https://blog.gatunka.com/2009/09/20/ime-basics-for-developers/