Opened 4 years ago

Last modified 4 years ago

#4008 closed enhancement

Missing unit action hotkeys — at Version 11

Reported by: elexis Owned by:
Priority: Nice to Have Milestone: Alpha 21
Component: UI & Simulation Keywords: simple patch
Cc: Patch:

Description (last modified by Imarok)

There are hotkeys for almost all unit actions (destroy, garrison, guard, ...), but some are missing: back-to-work, heal and capture. They should be added for completeness.

The most problematic part will be finding an unused key for back-to-work, see default.cfg. (heal and capture should be set to unused(#3051), as they are the default actions)

The files to modify can be found in binaries/data/mod/public/gui/session/. unit_actions.js should show that hotkey in the tooltips, see also r18252.

Change History (17)

comment:1 by Imarok, 4 years ago

What about Alt + Right click for repairing and 'U' for unloading?

comment:2 by elexis, 4 years ago

That seems ok to me (especially since garrisoning works like that too).

comment:3 by Sandarac, 4 years ago

Keywords: review patch added
Milestone: BacklogAlpha 21
Summary: Missing unit action hotkeys[PATCH] Missing unit action hotkeys

by Sandarac, 4 years ago

Adds hotkeys as suggested by Imarok, and "Y" for rally point focusing

comment:4 by elexis, 4 years ago

Notice #1720 suggesting Y = patrol, but maybe that one can use "P" as that seems to be unused for now.

comment:5 by elexis, 4 years ago

Not sure whether we actually need an assigned key for the rallypoint. With #3051 / #3990 it could add an unassigned hotkey that could be assigned by people who really want that.

comment:6 by Imarok, 4 years ago

  • Your patch only adds the repair hotkey when setting up a rallypoint. When commanding a unit it doesn't work.
Last edited 4 years ago by Imarok (previous) (diff)

by Imarok, 4 years ago

This is a fixed and rebased version of your patch

comment:7 by elexis, 4 years ago

Keywords: review removed

A repair hotkey should certainly work too when selecting units. It should have the same effect as when clicking on that button.

This however will conflict with other uses of Alt, for example Alt+doubleclick means selecting all units of that kind.

by Imarok, 4 years ago

Uses "J" for repairing

comment:8 by Imarok, 4 years ago

Keywords: review added

by Imarok, 4 years ago

Setting the rallypoint focus hotkey to unused (refs #3051)

by Imarok, 4 years ago

Fixed some style mentioned by elexis in irc today

comment:9 by elexis, 4 years ago

In 18578:

Hotkeys to repair, ungarrison and focus on the rallypoint. Patch by Imarok, refs #4008.

comment:10 by elexis, 4 years ago

Keywords: review removed
Milestone: Alpha 21Backlog
Type: defectenhancement

Changes to the committed patch:

  • Repairing is also expected to work with foundations
  • It is unexpected that the hotkey does something other than pressing it does. But since this is the case for the other unit action buttons, we'll go with it.
  • default.cfg: Ungarrisoning isn't a modifier.
  • Using ["Player", "Ally"] instead of ["Ally"] for consistency (despite not being mandatory). Not switching to MutualAlly since the simulation checks for Ally too.
  • Notice the repair hotkey is actually useful and not equivalent to a simple right click as it allows forcing units to repair a building even if they could dropoff carried resources or capture it.
  • Updated wiki:HotKeys.

Remaining TODO:

  • No hotkey for back-to-work. That should be a useful one.
  • Heal, capture, returnresource don't have hotkeys. Not sure if they are useful. Capture hotkeys probably, since a unit might be repairable and capturable at the same time f.e..

comment:11 by Imarok, 4 years ago

Description: modified (diff)
Keywords: patch removed
Summary: [PATCH] Missing unit action hotkeysMissing unit action hotkeys

by Imarok, 4 years ago

Attachment: 4008_back_to_work.patch added

Add a hotkey for back-to-work

Note: See TracTickets for help on using tickets.