fix: avoid handling keybinds after vanilla input focus
This commit is contained in:
@@ -24,6 +24,8 @@ internal unsafe class KeybindManager : IDisposable {
|
|||||||
internal bool DirectChat;
|
internal bool DirectChat;
|
||||||
private long LastRefresh;
|
private long LastRefresh;
|
||||||
|
|
||||||
|
private bool VanillaTextInputHasFocus;
|
||||||
|
|
||||||
private readonly Dictionary<string, Keybind> Keybinds = new();
|
private readonly Dictionary<string, Keybind> Keybinds = new();
|
||||||
private static readonly IReadOnlyDictionary<string, ChannelSwitchInfo> KeybindsToIntercept = new Dictionary<string, ChannelSwitchInfo>
|
private static readonly IReadOnlyDictionary<string, ChannelSwitchInfo> KeybindsToIntercept = new Dictionary<string, ChannelSwitchInfo>
|
||||||
{
|
{
|
||||||
@@ -390,7 +392,19 @@ internal unsafe class KeybindManager : IDisposable {
|
|||||||
|
|
||||||
// Vanilla text input has focus
|
// Vanilla text input has focus
|
||||||
if (RaptureAtkModule.Instance()->AtkModule.IsTextInputActive())
|
if (RaptureAtkModule.Instance()->AtkModule.IsTextInputActive())
|
||||||
|
{
|
||||||
|
VanillaTextInputHasFocus = true;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the vanilla text input has just lost focus, clear all keys so we
|
||||||
|
// don't try to process them immediately.
|
||||||
|
if (VanillaTextInputHasFocus)
|
||||||
|
{
|
||||||
|
Plugin.KeyState.ClearAll();
|
||||||
|
VanillaTextInputHasFocus = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var modifierState = GetModifiers(source);
|
var modifierState = GetModifiers(source);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user