Opened 8 years ago

Last modified 5 years ago

#3897 new enhancement

[PATCH] In gamesetup: Use a hotkey to start the game or get ready

Reported by: Imarok Owned by:
Priority: If Time Permits Milestone: Backlog
Component: UI – Game setup Keywords: patch
Cc: Patch:

Description (last modified by Imarok)

It would be usefull to use Enter key when in gamesetup to start the game or get ready

Attachments (2)

ready_startgame_hotkey.patch (1.9 KB ) - added by Imarok 8 years ago.
defines a hotkey for start game or be ready in the gamesetup
ready_startgame_hotkey_v2.patch (1.5 KB ) - added by Imarok 8 years ago.
Now uses the "F1" key

Download all attachments as: .zip

Change History (20)

comment:1 by elexis, 8 years ago

More useful than focusing the chat when entering the multiplayergamesetup? http://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js#L263

comment:2 by Imarok, 8 years ago

Good question But it would be usefull when the chat isn't focused and when you play singleplayer.

Maybe just start focus the chat when some key != enter is pressed and forward this key to the chat input box. (Could be difficult to implement ;) )

comment:3 by Imarok, 8 years ago

Description: modified (diff)
Summary: In gamesetup: Use enter to start a game or get readyIn gamesetup: Use enter key to start a game or get ready

by Imarok, 8 years ago

defines a hotkey for start game or be ready in the gamesetup

comment:4 by Imarok, 8 years ago

Keywords: review patch added
Milestone: BacklogAlpha 21
Priority: Nice to HaveIf Time Permits
Summary: In gamesetup: Use enter key to start a game or get ready[PATCH] In gamesetup: Use enter key to start a game or get ready

comment:5 by elexis, 8 years ago

Keywords: simple review removed
  • Doesn't actually work for me, neither in singleplayer nor in multiplayer.
  • wrong indentation in the xml
  • in that xml function, you can return if not enabled, and then use one simple if-else without braces
  • (The credits part was committed before)
  • For multiplayer the chat is focused on join, so if that isn't changed, the feature doesn't make sense for multiplayer.
  • I'm not sure if this feature is needed at all. How often did you join multiplayermatches and didn't care about any of the settings? Usually people have to talk things through, thus are required to focus the chat (thus are required to click the button). If you are serious about this, come to IRC and convince mimo, leper, fatherbushido or sanderd17 ;)

I agree though that it would be nice to have a system to control the GUI solely with the keyboard (ticket somewhere). Just the enter key seems a bad choice if we don't have a way to change focus from the keyboard.

in reply to:  5 comment:6 by Imarok, 8 years ago

Replying to elexis:

  • Doesn't actually work for me, neither in singleplayer nor in multiplayer.

Hmm :( It worked for me :D

I agree though that it would be nice to have a system to control the GUI solely with the keyboard (ticket somewhere). Just the enter key seems a bad choice if we don't have a way to change focus from the keyboard.

I just took a random key ;) But it is difficult to find a key that is not needed for the chat (If you have ideas...)

comment:7 by Imarok, 8 years ago

Maybe the Pause key ;)

Last edited 8 years ago by Imarok (previous) (diff)

by Imarok, 8 years ago

Now uses the "F1" key

comment:8 by Imarok, 8 years ago

Also rewrote it. Should work now.

comment:9 by Imarok, 8 years ago

Keywords: review added

comment:10 by elexis, 8 years ago

Summary: [PATCH] In gamesetup: Use enter key to start a game or get ready[PATCH] In gamesetup: Use a hotkey to start the game or get ready

comment:11 by elexis, 8 years ago

Actually that's quite nice to have that hotkey.

  • How about showing the hotkey in the tooltip of the button (like the hotkeys for queueing units in the selection panel)
  • Is that the only useful hotkey for gamesetup or shouldn't we add all of them that we can identify? (Maybe with #3806)

in reply to:  11 comment:12 by Imarok, 8 years ago

Replying to elexis:

  • Is that the only useful hotkey for gamesetup or shouldn't we add all of them that we can identify? (Maybe with #3806)

What has this to do with #3806?

comment:13 by sanderd17, 8 years ago

F1 is a quite standard key in most programs to get some sort of "help" functionality. I don't think we should use F1 for something else.

in reply to:  13 comment:14 by elexis, 8 years ago

Replying to sanderd17:

F1 is a quite standard key in most programs to get some sort of "help" functionality. I don't think we should use F1 for something else.

Kind of true, but looking at my keyboard, there aren't too many choices that make sense. The next unused hotkey would be F3. :D (Also I keycombis with modifier keys like Alt should probably be avoided, so we can't use R).

Replying to Imarok:

What has this to do with #3806?

As intended by that ticket there will be more controllers of the game in the feature. Thus we might think about adding hotkeys for controlling the GUI objects. But it seems #3235 would be a better and more universal solution for that.


Also I think if we have such a hotkey, it would be great if it worked also when the chat is focused and focus the previously focused thing again after activation (or not change the focus at all).

comment:15 by Imarok, 8 years ago

Keywords: review removed

comment:16 by Imarok, 8 years ago

removed until hotkey works even if chat is focussed.

comment:17 by elexis, 8 years ago

Milestone: Alpha 21Backlog

This might actually impossible to implement, since hotkeys are supposed to be disabled when a text element is focused. Otherwise one wouldn't be able to type chat in games without doing all kinds of unintended actions. (For the same reason the autocomplete tab hotkey is hardcoded in cpp files).

It seems unlikely that the ready hotkey will be used if it won't work if the chat is focused, since that chat is focused by default and since most people will use the chat before starting the game.

comment:18 by Imarok, 5 years ago

Component: UI & SimulationGame setup

Move tickets to Game Setup as UI & Simulation got some sub components.

Note: See TracTickets for help on using tickets.