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