Dalamud icon indicating copy to clipboard operation
Dalamud copied to clipboard

Dalamud IME needs to disable game input, direct input mode prints to chat window still

Open daemitus opened this issue 3 years ago • 4 comments

daemitus avatar Sep 13 '21 14:09 daemitus

This in the IME window, does not work.

var io = ImGui.GetIO();
if (io.WantTextInput)
{
    var keystate = Service<KeyState>.Get();
    keystate.ClearAll();
}

daemitus avatar Sep 14 '21 02:09 daemitus

The same problem occurs when a text box is being typed.

https://user-images.githubusercontent.com/29140293/133202296-9d483678-1901-4012-a132-635b242ca593.mp4

marimelon avatar Sep 14 '21 05:09 marimelon

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.

Bluefissure avatar Sep 27 '21 20:09 Bluefissure

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

Bluefissure avatar Feb 22 '22 20:02 Bluefissure