Skip to content

feat(hotkey): Enable players to hold down hotkeys to queue multiple units#1935

Draft
Caball009 wants to merge 8 commits intoTheSuperHackers:mainfrom
Caball009:feat_hotkey_repeat
Draft

feat(hotkey): Enable players to hold down hotkeys to queue multiple units#1935
Caball009 wants to merge 8 commits intoTheSuperHackers:mainfrom
Caball009:feat_hotkey_repeat

Conversation

@Caball009
Copy link

@Caball009 Caball009 commented Dec 1, 2025

QoL improvement to make it more convenient to add units to build queues by holding down hotkeys.

Currently, a hotkey needs to be held down for longer than 200 milliseconds to start queuing multiple units. Next units will take less and less time to queue.

Work in progress.

TODO:

  • Revisit key event timings
  • Maybe put this behind some sort of flag or macro for multiplayer
  • Maybe add settings for options.ini
  • Replicate in Generals

@Caball009 Caball009 added the Enhancement Is new feature or request label Dec 1, 2025
@Caball009 Caball009 added the Input label Dec 1, 2025
@Skaronator
Copy link

It would be really cool if holding multiple hotkeys at once would queue units alternatingly between them.

Example: holding A and B could queue units in an A → B → A → B pattern.

@Skaronator
Copy link

This feature would also be really useful if you want to build a unit, but you are out of money. So you just hold down the button and no longer need to spam it.

@Skyaero42
Copy link

What is the risk that a player accidentally builds one extra unit due to holding the key too long?
This feature may need to be behind an options.ini setting.

@Caball009
Copy link
Author

This feature may need to be behind an options.ini setting.

I think that's fair. I'll look into that.

@Caball009
Copy link
Author

Caball009 commented Dec 5, 2025

It would be really cool if holding multiple hotkeys at once would queue units alternatingly between them.

Example: holding A and B could queue units in an A → B → A → B pattern.

I'll check whether this is feasible.

This feature would also be really useful if you want to build a unit, but you are out of money. So you just hold down the button and no longer need to spam it.

Being able to queue units without paying in advance is not related to this PR and requires a bigger change.

e.g. for the 'S' button, which can be both a meta event and a hotkey.
@Caball009
Copy link
Author

It would be really cool if holding multiple hotkeys at once would queue units alternatingly between them.

Example: holding A and B could queue units in an A → B → A → B pattern.

The current code supports this. It appears to work well enough.

@DrGoldFish1
Copy link

This would be a nice feature to have as an option for hosts to enable this. But I feel like it will lower the required macro level to be a pro player if it is enabled by start. So needs to be behind a flag for sure cause not everyone will be happy to have it in the game. Unless the host needs to enable it

@xezon
Copy link

xezon commented Jan 30, 2026

I think this should be behind an option in multiplayer.ini for Mod opt-in.

My first thought was GameData.ini, but I think for Single Player this feature is always ok, so we could make it opt-in for multiplayer specifically.

This would then also be where future Controversial changes go when they should be opt-in or opt-out for Multiplayer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Is new feature or request Input

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments