Skip to content

Add native shortcut editor with automatic action discovery - #285

Draft
Guffawaffle wants to merge 102 commits into
netniV:devfrom
Guffawaffle:feature/mod-shortcut-settings
Draft

Guffawaffle wants to merge 102 commits into
netniV:devfrom
Guffawaffle:feature/mod-shortcut-settings

Conversation

@Guffawaffle

@Guffawaffle Guffawaffle commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Adds an in-game shortcut editor under Settings → Mod Settings → Shortcuts, so bindings can be changed without editing TOML.

Actions are grouped by purpose. Players can capture, add, remove or restore bindings, with overlap warnings and an explicit Apply step. The editor preserves alternative bindings, comments and unrelated settings, and rejects stale edits.

Capture cancels on Escape, focus loss or leaving the page. Input remains captured until key release to avoid triggering gameplay actions.

Windows x64 native UI. Depends on #269 and #282.

The shared settings framework and persistence dependencies include macOS support; shortcut capture and editor registration remain Windows-only.

Validation: Windows release build passed. Settings fixtures passed. Mac ARM players confirmed settings, galaxy controls, and persistence on the combined integration build; Intel Mac runtime testing remains unconfirmed. Platform CI for this PR is tracked separately.

Guffawaffle and others added 11 commits September 18, 2026 22:04
xmake invokes swift-frontend directly, bypassing the Swift driver's default
external macro plugin search paths. In the Xcode 27 SDK, SwiftUI property
wrappers (e.g. @State) are external macros requiring libSwiftUIMacros, which
the compiler could not locate.

Derive the SDK from xcrun and re-add the driver-equivalent
-external-plugin-path flags for the usr/local and usr lib plugin directories.
Older SDKs without libSwiftUIMacros.dylib skip the flags entirely, so
pre-macro toolchains keep the previous build line.
Widen RegisterShortcutPages to also compile for __APPLE__, matching the
shared native settings adapter. Installation stays gated at runtime by the
focus query, ScreenManager dispatcher registration and per-target Mach-O
extent checks; layout mode remains Windows-only, so macOS capture is
physical and reports platform_unsupported for layout.

Capture stores macOS Command as the single generic WIN- modifier: a physical
Command key may arrive through both the Windows and Command keycodes, and
emitting the prefix from either family produced WIN-WIN. The editor renders
stored WIN- bindings as CMD on macOS through a presentation-only token
alias; staged tokens, summaries, restore defaults and overlap warnings use
it, while input parsing and TOML serialization keep the canonical WIN-
spelling on every platform.

Docs move macOS into the native settings adapter contract and record that
in-game ARM runtime smoke evidence is still pending.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants