Fix virtual key check missing
This commit is contained in:
@@ -394,11 +394,11 @@ internal sealed unsafe class Chat : IDisposable
|
||||
|
||||
private static byte[] EncodeMessage(string str) {
|
||||
using var input = new Utf8String(str);
|
||||
using var ouput = new Utf8String();
|
||||
using var output = new Utf8String();
|
||||
|
||||
input.Copy(PronounModule.Instance()->ProcessString(&input, true));
|
||||
ouput.Copy(PronounModule.Instance()->ProcessString(&input, false));
|
||||
return ouput.AsSpan().ToArray();
|
||||
output.Copy(PronounModule.Instance()->ProcessString(&input, false));
|
||||
return output.AsSpan().ToArray();
|
||||
}
|
||||
|
||||
internal bool IsCharValid(char c)
|
||||
|
||||
@@ -315,10 +315,8 @@ internal unsafe class KeybindManager : IDisposable {
|
||||
private void UpdateKeybinds()
|
||||
{
|
||||
foreach (var name in KeybindsToIntercept.Keys)
|
||||
{
|
||||
Keybinds[name] = GetKeybind(name);
|
||||
}
|
||||
}
|
||||
|
||||
private static ModifierFlag GetModifiers(KeyboardSource source)
|
||||
{
|
||||
@@ -348,6 +346,10 @@ internal unsafe class KeybindManager : IDisposable {
|
||||
{
|
||||
if (key == VirtualKey.NO_KEY)
|
||||
return false;
|
||||
|
||||
if (!Plugin.KeyState.IsVirtualKeyValid(key))
|
||||
return false;
|
||||
|
||||
if (source == KeyboardSource.Game)
|
||||
return Plugin.KeyState[key];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user