Skip to content

FactoryQ Manager: contextual load hotkeys + toggle action (v1.7)#8047

Open
MadeByGabe wants to merge 1 commit into
beyond-all-reason:masterfrom
MadeByGabe:pr/factoryq-contextual
Open

FactoryQ Manager: contextual load hotkeys + toggle action (v1.7)#8047
MadeByGabe wants to merge 1 commit into
beyond-all-reason:masterfrom
MadeByGabe:pr/factoryq-contextual

Conversation

@MadeByGabe

@MadeByGabe MadeByGabe commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Work done

Adds factory_preset_toggle action.

If that action is used, then preset load actions only fire and consume the keypress while the preset panel is open. In practice this means that a preset load which was triggered by space+1 before, now only triggers on space, space+1 (the first space is to open the preset panel, the second to load a preset).

The factory_preset_show behavior is unchanged except that too consumes the keypress. factory_preset_show can just be replaced with factory_preset_toggle if desired.

Using factory_preset_toggle frees up the space+[0-9] keybinds for other uses while still allowing the factory preset load actions to be used with the same keybinds, but only while the preset panel is open.

Test steps

  • Enable the FactoryQ Manager widget
  • Make a preset with let's say space+alt+1
  • Load the preset with space+1 to make sure it still works
  • Change the bind any+sc_space factory_preset_show to bind any+sc_space factory_preset_toggle
  • Try to load the preset with space+1 and make sure it doesn't work anymore (the bind passes through)
  • Open the preset panel with space and then load the preset with space+1 to make sure it works.

AI / LLM usage statement:

I wrote the state machine, Claude Code implemented the corresponding branch logic.

Adds `factory_preset_toggle` action.
If that action is used, then preset load actions only fire and consume the keypress while the preset panel is open. In practice this means that a preset load which was triggered by `space+1` before, now only triggers on `space, space+1` (the first space is to open the preset panel, the second to load a preset).

`factory_preset_show` behavior is unchanged.

This frees the Meta+[0-9] binds for other widgets when the preset panel is
closed. This is needed so Squad Selection can reuse them for group selection.
@github-actions

Copy link
Copy Markdown
Contributor

Integration Test Results

15 tests  ±0   6 ✅ ±0   3s ⏱️ ±0s
 1 suites ±0   8 💤 ±0 
 1 files   ±0   1 ❌ ±0 

For more details on these failures, see this check.

Results for commit 9694dc9. ± Comparison against base commit f1d591f.

@przystuj

Copy link
Copy Markdown
Contributor

I'm wondering, do you even need this toggle? You can change the actions so they pass the inputs forward instead of consuming them

@MadeByGabe

Copy link
Copy Markdown
Contributor Author

Replacing my factory queue by loading a preset when I just want to select my group isn't optimal.
And selecting a group every time I want to load a preset isn't optimal either.

So in my opinion this toggle is needed.

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