Skip to content
This repository was archived by the owner on Apr 8, 2026. It is now read-only.

Use internal SkyHook event types with union-backed key fields#2

Merged
2228293026 merged 1 commit into
masterfrom
codex/refactor-skyhook-to-use-internal-game-system
Mar 7, 2026
Merged

Use internal SkyHook event types with union-backed key fields#2
2228293026 merged 1 commit into
masterfrom
codex/refactor-skyhook-to-use-internal-game-system

Conversation

@2228293026

Copy link
Copy Markdown
Member

Motivation

  • Make the local SkyHook compatibility layer match the game’s internal SkyHook layout and types to improve interoperability and avoid duplicating enum definitions.
  • Use a union-backed field for Label/Key so the managed event exactly maps to the in-game structure and can be enqueued/consumed without extra translations.
  • Keep the existing Win32 INPUT definitions so the non-SkyHook SendInput path remains unaffected.

Description

  • Replaced the previous local SkyHook enums/struct with SkyHookEvent using LayoutKind.Explicit and a shared field at the same offset for global::SkyHook.KeyLabel Label and ushort Key to act as a union. (edited Macro/SkyHookSystem.cs)
  • Switched the Type field to use global::SkyHook.EventType and adjusted Create / GetTimeInTicks / time conversion to the game-aligned format, removing the previous local mapping logic. (edited Macro/SkyHookSystem.cs)
  • Preserved the Win32 INPUT / InputUnion / KEYBDINPUT / mouse/hardware structs in the compatibility file so SendInput path still works. (edited Macro/SkyHookSystem.cs)
  • Updated AsyncInputManager to compare event types against global::SkyHook.EventType.KeyPressed where the local EventType was previously used. (edited Macro/AsyncInputManager.cs)
  • Committed changes with message: "Use game SkyHook types and union-backed event fields".

Testing

  • Ran repository file inspections and diffs to validate edits and ensure references were updated; these checks succeeded locally.
  • Attempted to build the solution with dotnet build BaseMacro.slnx -c Release and msbuild BaseMacro.csproj /t:Build /p:Configuration=Release, but both commands failed because dotnet/msbuild are not available in this environment, so compilation could not be verified.
  • Performed git operations to add and commit the two modified files and confirmed the commit was created successfully.

Codex Task

@2228293026 2228293026 merged commit e4cc34b into master Mar 7, 2026
@2228293026 2228293026 deleted the codex/refactor-skyhook-to-use-internal-game-system branch March 7, 2026 08:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant