Hotkey-Layout

Information and discussion for custom maps and mods.
Tirili
Posts: 41
Joined: Fri Jun 24, 2011 12:02 am

Hotkey-Layout

Post by Tirili »

Scroll down for latest updates!

Since I just got "ctrl+someOtherKey"-hotkeys to work I thought about a new Hotkey-Layout:

Some features of this:

- The 5 Production Buildings can be selected/cycled by crtl-(space,a,s,d,f) - which are mainly in one row
(use ctrl-space and then tab to switch to the defense buildings tap)
- while a production-building's tap is shown on the right, hotkeys for building do not interfere with unit commands
(like scatter, stance cycle, attack-move) or production-building's hotkeys (space,a,s,d,f)
- q,w,e,r are saved for future function hotkeys like w-powerdown, e-sell, r-repair.
- buildings are mainly built with keys in the top right of the keyboard
- units are mainly built with keys in the lower line (z,x,c,v,b,n,m)
- all transport units like ranger, apc, transport ship and -heli are built with t
- all lightning units and buildings are built with i (tesla coil, tesla tank, shock trooper)
- all unit commands (like scatter, stance cycle, attack-move) are in the same line
- correspondent units (like artillery and v2) or buildings (like sam-site and aa gun) have the same hotkeys

To download and test the changes checkout https://github.com/TiriliPiitPiit/OpenR ... a3bfc79f78.

Find a better text-formatting of this here: http://pastebin.com/xc7V8z0E

Code: Select all

New Hotkeys:

For English Keyboard Layout

---Units-Commands:

AttackMove	z
Stop		x
Scatter		c
StanceCycle	v
Deploy		b

---Buildings (Build panel on the right):

Power Plant:		p
Ore Refinery:		o
Advanced Power Plant:	g
Sub Pen:		d				Select/Cycle:	ctrl-d
Barracks:		a	(Allies & Sowjets)	Select/Cycle:	ctrl-a
Service Depot:		n
Naval Yard:		d				Select/Cycle:	ctrl-d
Silo:			m
War Factory:		s				Select/Cycle:	ctrl-s
Airfield:		f				Select/Cycle:	ctrl-f
Radar Dome:		l
Tech Center:		t	(Allies & Sowjets)
Helipad:		f				Select/Cycle:	ctrl-f

---Defense-Buildings (Build panel on the right):

Pillbox:		t
Flame Tower:		t
Camo Pillbox:		u
Turret:			i
AA Gun:			o
Tesla Coil:		i
SAM Site:		o
Iron Curtain:		h
Chronosphere:		h
Missile Silo:		k
Sandbags:		l
Barbed Wire:		m
Concrete Wall:		n

---Infantry (Build panel on the right):

Rifle Infanftry:	z
Grenadier:		b
Rocket Soldier:		x
Medic:			m
Attack Dog:		n
Engineer:		c
Flamethrower:		m
Spy:			b
Tanya:			v
Shock Trooper:		i

---War Factory (Build panel on the right):

Ore Truck:		z
Ranger:			t
Mine Layer (Anti-Pers):	l
Mine Layer (Anti-Tank): l
Flaktruck:		c
V2 Rocket:		x
Light Tank:		v
Heavy Tank:		n
APC:			t
Medium Tank:		b
Artillery:		x
Mammoth Tank:		m
MCV:			space				Select/Cycle:	ctrl-space
Supply Truck:		k
Tesla Tank:		i

---Docks (Build panel on the right):

Transport:		t
Submarine:		z
Gunboat:		z
Missile Sub:		c
Destroyer:		x
Cruiser:		c

---Airports (Build panel on the right):

YAK:			z
Longbow:		x
Hind:			z
Mig:			x
Chinook:		t
What do you think about this?
Last edited by Tirili on Wed Jan 11, 2012 5:44 pm, edited 4 times in total.

Tirili
Posts: 41
Joined: Fri Jun 24, 2011 12:02 am

Post by Tirili »

Here's an update:

- Production Buildings (Construction Yard, Barracks, ...) are now built on Ctrl+hotkey, while selected / cycled on hotkey only. So they are an exception to the pattern "build on hotkey", that still holds for all other buildings and all units.

- All production hotkeys AND unit command hotkeys are now in the upper line (q,w,e, ...).

- To make this possible, 2 changes were needed:
- When units are selected, you cannot use production hotkeys any more.
- You can only use unit commands, when units are selected (ok, was sth. like a bug before).

- You can still use production hotkeys, while the corresponding production building is not selected, but no units must be selected! Click into the wilds to deselect everything.

- The lower line (z,x,c, ...) is preserved for future hotkey functions like repair, sell, unpower, set gather point, ...

I think, it's more comfortable to have all production hotkeys on the upper line. When you don't have your left hand on the keyboard and quickly want to build a rifle soldier for example, you can now use your left hand's 'up-momentum' pressing a and then pressing q.
To build defense buildings, you must press space and then tab and then the production hotkey of the desired building.

See the hotkey mapping here: http://pastebin.com/jyGwKUGH

And see the code changes here: https://github.com/TiriliPiitPiit/OpenR ... 1ea#diff-1

Tirili
Posts: 41
Joined: Fri Jun 24, 2011 12:02 am

Post by Tirili »

Here's another update:

- You can choose a Hotkey-Modifier key in the settings menu.
- You can now use a checkbox in the settings menu to switch between these two kinds of behaviour:
- Use Hotkey-Modifier (Alt or Ctrl - You can specify it in the menu) + <Hotkey> to select/cycle production buildings and use <Hotkey> to build them.
- Use <Hotkey> to select/cycle production buildings and use Hotkey-Modifier + <Hotkey> to build them (I call it Inverse Hotkey-Modifier Behavior).

- All other buildings can be built by <Hotkey> or by Hotkey-Modifier + <Hotkey>.

- Infantry hotkeys have changed, so that you don't have to use your weak fingers twice.

See the hotkey mapping here: http://pastebin.com/kAbzzMJg

And see the code changes here: https://github.com/TiriliPiitPiit/OpenR ... 2ec2a9ddae

Tirili
Posts: 41
Joined: Fri Jun 24, 2011 12:02 am

Post by Tirili »

And another update:

- Pressing space immediately centers viewport on your base (i.e. select cycle construction yards and scroll to it).

- There is a key (default is x) to select the defense buildings tab on the build palette (use the corresponding modifier, if you want to center viewport on your base or not).

- For production buildings you can now choose which modifier (ctrl, alt, none) you want to use for which function (build, select/cycle and center viewport, select/cycle without scrolling).

- The new mcv / construction yard hotkey is c.

- All together you have mapped a,s,d,f and x,c (all + corresponding modifier) for the different build palette tabs per default.


See the hotkey mapping here: http://pastebin.com/VVXV8W5z

And see the code changes here: https://github.com/TiriliPiitPiit/OpenR ... ntegration

Here's an image of the new key settings menu:
Image

And here's the hotkey mapping in bad text formatting:

Code: Select all

New Hotkeys&#58;

For English Keyboard Layout


=== Unit Commands ===
=====================

Command Name	Hotkey

AttackMove	q
Stop		w
Scatter		e
StanceCycle	r
Deploy		t


=== Produciont Buildings ===
============================

Building/Unit Name	Hotkey	Faction

---Buildings

Power Plant&#58;		q	as
Ore Refinery&#58;		e	as
Advanced Power Plant&#58;	w	as
Sub Pen&#58;		d	 s
Barracks&#58;		a	as
Service Depot&#58;		y	as
Naval Yard&#58;		d	a
Silo&#58;			u	as
War Factory&#58;		s	as
Airfield&#58;		f	 s
Radar Dome&#58;		r	as
Tech Center&#58;		i	as
Helipad&#58;		f	a

---Defense-Buildings

Pillbox&#58;		q	a
Flame Turret&#58;		q	 s
Camo Pillbox&#58;		w	a
Turret&#58;			e	a
AA Gun&#58;			r	 s
Tesla Coil&#58;		e	 s
SAM Site&#58;		r	a
Iron Curtain&#58;		y	 s
Chronosphere&#58;		y	a
Missile Silo&#58;		u	as
Sandbags&#58;		i	a
Wire Fence&#58;		o	 s
Concrete Wall&#58;		p	as

---Infantry

Rifle Infanftry&#58;	w	as
Grenadier&#58;		u	 s
Rocket Soldier&#58;		r	as
Medic&#58;			y	a
Attack Dog&#58;		q	 s
Engineer&#58;		e	as
Flamethrower&#58;		y	 s
Spy&#58;			o	a
Tanya&#58;			t	as
Shock Trooper&#58;		i	 s

---Vehicles

Ore Truck&#58;		q	as
Ranger&#58;			t	a
Mine Layer &#40;Anti-Pers&#41;&#58;	y	 s
Mine Layer &#40;Anti-Tank&#41;&#58; y	a
Flaktruck&#58;		p	 s
V2 Rocket&#58;		w	 s
Light Tank&#58;		e	a
Heavy Tank&#58;		e	 s
APC&#58;			t	 s
Medium Tank&#58;		r	as
Artillery&#58;		w	a
Mammoth Tank&#58;		u	 s
MCV&#58;			c	as
Supply Truck&#58;		o	as
Tesla Tank&#58;		i	 s

---Ships

Transport&#58;		t	as
Submarine&#58;		q	 s
Gunboat&#58;		q	a
Missile Submarine&#58;	e	 s
Destroyer&#58;		w	a
Cruiser&#58;		e	a

---Aircraft

YAK&#58;			q	 s
Longbow&#58;		w	a
Hind&#58;			q	a
Mig&#58;			w	 s
Chinook&#58;		t	a

knivesron
Posts: 93
Joined: Wed Aug 10, 2011 5:05 am

Post by knivesron »

i think openra really needs some proper dvorak support. on my xp computers it doesent reconize my dvorak and keeps trying to type in qwerty. do you relise how hard that is when youve been using dvorak for years. its like some sort of code talk. the windows 7 systems seem to pick it up ok though

Tirili
Posts: 41
Joined: Fri Jun 24, 2011 12:02 am

Post by Tirili »

Update:

- Added a patch from Hacklex, that adds hotkeys for the following functions:
Switch to Sell-Cursor
Switch to Power-Down-Cursor
Switch to Repair-Cursor
Place Normal-Building
Place Defense-Building
- Made every "special hotkeys" and "unit command hotkeys" changeable in a now scrollable key-menu
- Changed default hotkey mapping so that Concrete Wall is on "w" and Camo Pillbox is on "p"


See the hotkey mapping here: http://pastebin.com/Vr7NZRS4

And see the code changes here: https://github.com/TiriliPiitPiit/OpenR ... cklexAddon

Here's an image of the new key settings menu:
Image

Tirili
Posts: 41
Joined: Fri Jun 24, 2011 12:02 am

Post by Tirili »

Update:

Today Playtest20120304 was released and so here's an update to the hotkey-add-ons:

- Added the new "Move Viewport to Last Event" (GoToLastEvent) function to the key settings menu (default key = space)
- Changed default key of "Move Viewport to Base" function from space to g

See the hotkey mapping here: http://pastebin.com/AWjdp2w4

And see the code changes here: https://github.com/TiriliPiitPiit/OpenR ... keyAddons3

Kanar
Posts: 54
Joined: Mon Apr 30, 2012 1:39 pm

Post by Kanar »

OK, now for a dumb end-user like me, who does not have anything to do with coding n stuff:

Where exactly can i download it and what do I have to do to make it work?

:-)

Kanar
Posts: 54
Joined: Mon Apr 30, 2012 1:39 pm

Post by Kanar »

Made your zip file, I can upload it anywhere now.

BTW, i still don't understand what the modifier keys are for.
And what do you mean by cycle?

Tirili
Posts: 41
Joined: Fri Jun 24, 2011 12:02 am

Post by Tirili »

For each Production Building (Construction Yard, Barracks, War-Factory, Docks, Airfiels/Helipads) there is a hotkey.

For example hotkey "a" is for barracks.

You can press "a" together with different modifier keys (alt, ctrl, ... ).

In the key settings menu you specify what modifiers are used for what kind of actions.

"Build" means "What modifier should be pressed to produce a barracks?".

"Cycle" means "What modifier should be pressed to select / cycle through the already built instances of this production building?", where cycling is hopping with the viewport through the different positions of the instances while pressing the hotkey again and again and selecting would mean pressing only once.

"Select corresponding Tab on Build Palette only" should be self-explanatory.

Matt
Posts: 1155
Joined: Tue May 01, 2012 12:21 pm
Location: Germany

Post by Matt »

I think you should merge your changes into OpenRA.

Kanar
Posts: 54
Joined: Mon Apr 30, 2012 1:39 pm

Post by Kanar »

Can it be modified to build again even when units are selected?

I want to have the bottom row zxcvb to have for unit commands (scatter, stances, stop and so on).
Then there are still enough keys for most used buildings.

Also:
Can the C-key for the production buildings tab be reassigned? how?

Tirili
Posts: 41
Joined: Fri Jun 24, 2011 12:02 am

Post by Tirili »

Let's sum it up:

There are buildings (constructions yard, barracks, weapon factory, naval yard / subpen, helipad / airfield) in which you can produce things. I call them "production buildings".
On the other hand there are normal buildings like radar or power plant and defense buildings like tesla coil or aa gun.

Each building has it's own hotkey (as well as units): http://pastebin.com/AWjdp2w4
For example the default hotkey of barracks is a.

Now there are different things you may want to do with the hotkey of a production building:

1) "Build" = when the tab for buildings is selected (the tab is the part of the panel on the right side of the OpenRA ingame screen)
you press a modifier-key (alt, ctrl, none, etc.) and the hotkey (like a for barracks) to start the production of the corresponding
production building (in case of a the barracks)

2) "Select/Cycle" = you press a modifier-key and the hotkey to move the viewport of the screen
to one of your already built production buildings of that type and if you press this combination again, you "cycle trough" them.

3) "Select corresponding Tab on Build Palette only" = you press a modifier-key and the hotkey to select the corresponding tab on the build palette
while the viewport is not moved.

In the "Keys" submenu of the settings menu you can specify which modifier to use for which of the 3 actions.



The default settings (which I don't like) are:

Build: <Hotkey> (which means, you have to press the hotkey only)

Cycle: Alt + <Hotkey>

Select corresponding Tab on Build Palette only: Ctrl + <Hotkey>

With these settings you must do this for example to build a heavy tank being Soviets:

Ctrl + s, e

So first you press Ctrl + s and then e.



What I prefer is to switch the settings this way:

Build: Ctrl + <Hotkey>

Select corresponding Tab on Build Palette only: <Hotkey>

Now you can easily build a heavy tank by pressing s and then e.
Other combination examples then are:

a,w for rifle soldier
a,r for rocket soldier
s,w for V2
s,q for ore-truck
d,q for sub
d,w for missile submarine
f,q for YAK
f,w for MIG
c,ctrl+a for barracks (use ctrl, because this is a production building)
c,ctrl+d for subpen
c,q for power plant
c,w for advanced power plant
c,r for radar dome
x,r for AA gun
x,e for tesla coil

For c in this case you can also use f1 and for x you can also use f2,
while f1 and f1 are mainly supposed to be used when the production of a building is finished and you quickly want to place it somewhere.

Also I like to swap the keys g and space in a way that
space moves viewport to construction yards and mcvs and
g moves to the last event's position (where you are being attacked or something).
Then you can quickly press space, ctrl+f to build an airfield/helipad for example.

The reason for why the default settings are not what I prefer is that conventions were made up by the majority of other popular rts-games like Age of Empires or Starcraft and
we wanted to stick to these conventions in some way.

@Kanar
When units are selected, the hotkeys to quickly build something are disabled, because these hotkeys are engaged for unit-commands in that time.
But you can still use the production building's hotkeys, because these are not engaged.
So while you have units select you can quickly press a,w to build a rifle soldier (with my preferred settings from above), but afterwards your units are not selected any more.
"I want to have the bottom row zxcvb to have for unit commands (scatter, stances, stop and so on).
Then there are still enough keys for most used buildings."
Just change the hotkeys in the keys-menu. Look at "Special Hotkeys" and "Hotkeys for Unit Commands"
"Can the C-key for the production buildings tab be reassigned? how?"
It can't be reassigned in the moment. I should change this.
So you're right, it's not possible to change the whole bottom line (z,x,c,v,b, etc.) in the moment.
But at least you can change the other keys of that line except c.
Last edited by Tirili on Thu Jun 14, 2012 10:27 pm, edited 1 time in total.

Kanar
Posts: 54
Joined: Mon Apr 30, 2012 1:39 pm

Post by Kanar »

Yes I hink i got it now.

its a little hard to get used to, but im gonna try.

I think alt + hotkey for production buildings is better than ctrl + hotkey, it is just more convenient.

Also, i have sell/repair/powerdown-cursors assigned to mouse buttons, so it is easiear to reach.

Tirili
Posts: 41
Joined: Fri Jun 24, 2011 12:02 am

Post by Tirili »

I was wrong, actually you can change the mapping of the c-key. I had set it up to be the hotkey for mcv in mods/ra/rules/vehicles.yaml, line 264.

Post Reply