forked from aly/qstbak
muffin v7.4.10
This commit is contained in:
parent
2df81c5d15
commit
b8dd142c23
47 changed files with 3604 additions and 1058 deletions
|
|
@ -9,6 +9,7 @@ using FFXIVClientStructs.FFXIV.Client.System.Input;
|
|||
using FFXIVClientStructs.FFXIV.Client.UI;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Controller.Steps.Common;
|
||||
using Questionable.Controller.Utils;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.Questing;
|
||||
|
||||
|
|
@ -67,7 +68,7 @@ internal static class Dive
|
|||
return ETaskResult.StillRunning;
|
||||
}
|
||||
logger.LogDebug("{Action} key {KeyCode:X2}", (result.Item1 == 256) ? "Pressing" : "Releasing", result.Item2);
|
||||
NativeMethods.SendMessage((nint)Device.Instance()->hWnd, result.Item1, result.Item2, IntPtr.Zero);
|
||||
WindowsKeypress.SendMessage((nint)Device.Instance()->hWnd, result.Item1, result.Item2);
|
||||
if (result.Item1 == 256)
|
||||
{
|
||||
_pressedKeys.Add(result.Item2);
|
||||
|
|
@ -86,7 +87,7 @@ internal static class Dive
|
|||
foreach (nint pressedKey in _pressedKeys)
|
||||
{
|
||||
logger.LogDebug("Releasing stuck key {KeyCode:X2} on stop", pressedKey);
|
||||
NativeMethods.SendMessage((nint)Device.Instance()->hWnd, 257u, pressedKey, IntPtr.Zero);
|
||||
WindowsKeypress.SendMessage((nint)Device.Instance()->hWnd, 257u, pressedKey);
|
||||
}
|
||||
_pressedKeys.Clear();
|
||||
_keysToPress.Clear();
|
||||
|
|
@ -160,17 +161,6 @@ internal static class Dive
|
|||
}
|
||||
}
|
||||
|
||||
private static class NativeMethods
|
||||
{
|
||||
public const uint WM_KEYUP = 257u;
|
||||
|
||||
public const uint WM_KEYDOWN = 256u;
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto)]
|
||||
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
|
||||
public static extern nint SendMessage(nint hWnd, uint Msg, nint wParam, nint lParam);
|
||||
}
|
||||
|
||||
private static List<nint>? GetKeysToPress(SeVirtualKey key, KeyModifierFlag modifier)
|
||||
{
|
||||
List<nint> list = new List<nint>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue