mirror of
https://github.com/waynebian01/Shigure.git
synced 2026-09-03 07:15:24 +08:00
Refactor and implement runtime session management
- Removed the UnitSelector class from UI and added a new UnitSelector class in Modules. - Introduced RuntimeSessionCoordinator to manage runtime sessions, ensuring safe concurrent operations. - Created ShigureRuntimeFactory to handle the creation of ShigureRuntime instances. - Added WindowsTriggerKeyState and WindowsVirtualKeyMap for handling key states and virtual key mappings. - Implemented IKeymapResolver interface for key mapping resolution. - Established runtime dependencies with interfaces for screen scanning, state building, logic evaluation, and key output.
This commit is contained in:
8
Input/WindowsTriggerKeyState.cs
Normal file
8
Input/WindowsTriggerKeyState.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Shigure;
|
||||
|
||||
internal sealed class WindowsTriggerKeyState : ITriggerKeyState
|
||||
{
|
||||
public int? ResolveVirtualKey(string keyName) => WindowsVirtualKeyMap.Resolve(keyName);
|
||||
|
||||
public bool IsPressed(int virtualKey) => NativeMethods.IsKeyDown(virtualKey);
|
||||
}
|
||||
Reference in New Issue
Block a user