Dalamud
Dalamud copied to clipboard
Dalamud IME needs to disable game input, direct input mode prints to chat window still
This in the IME window, does not work.
var io = ImGui.GetIO();
if (io.WantTextInput)
{
var keystate = Service<KeyState>.Get();
keystate.ClearAll();
}
The same problem occurs when a text box is being typed.
https://user-images.githubusercontent.com/29140293/133202296-9d483678-1901-4012-a132-635b242ca593.mp4
https://github.com/goatcorp/Dalamud/blob/fc800dd69b2a57a7de9cbc6ce4315582d674d537/Dalamud/Game/Gui/GameGui.cs#L589-L595 This hook prevents the keystate to be sent to the game so the input won't affect player's moving when input in imgui. Better to find another function that prevents the keystate to be sent to the in-game input fields.
Upd: I have tried to fix the triggered direct input by disabling the in-game direct input, but it looks like when the imgui exists wantTextInput the game will trigger the input again, which may need more investigation. For more information please view https://github.com/Bluefissure/IMEPlugin/commit/50fb35134f70a9801314f15aa14522196a1d7709#r67253964