Coder Diary #2 - Hot keys!
John Tiller games are clickfests. Too much mousing around! For example:
[*]To highlight disrupted units, one has to mouse sweep up to the top-level menu, then click the menu items Display->Highlight->Disrupted Units. (And if the menu is not showing, hit the M Toggle display of program menu beforehand.) To remove the highlight, one has to repeat the mouse movements and clicks.
Instead, how about:
[*]To highlight disrupted units, press the D hot key. To unhighlight, press the D hot key again. Simple.
Hot keys should be implemented for all Display->Highlight(s).
And so they are! (Or will be, in all future Campaign Series game releases. [:'(])
Here are the newly revised hot key assignments, not just the traditional ones, but also (virtually) all Display->Highlight(s), and several other useful hot key assignments besides:
"1", ON_DISPLAYIN, VIRTKEY
"2", ON_DISPLAYIN50, VIRTKEY
"3", ON_DISPLAYIN25, VIRTKEY
"4", ON_DISPLAYNORMAL, VIRTKEY
"5", ON_DISPLAYOUT, VIRTKEY
"A", ON_ADDASSAULT, VIRTKEY, CONTROL
"A", ON_HIGHLIGHTAA, VIRTKEY
"B", ON_BANZAI, VIRTKEY, CONTROL
"B", ON_DISPLAYBASES, VIRTKEY
"C", ON_CLEARASSAULT, VIRTKEY, CONTROL
"C", ON_DISPLAYCON, VIRTKEY
"D", ON_DIGGINGIN, VIRTKEY, CONTROL
"D", ON_HIGHLIGHTDISRUPT, VIRTKEY
"E", ON_HIGHLIGHTMINE, VIRTKEY
"F", ON_BUYBULLET, VIRTKEY, CONTROL
"F", ON_HIGHLIGHTFIRED, VIRTKEY
"G", ON_DAMAGE, VIRTKEY, CONTROL
"G", ON_DISPLAYRANGE, VIRTKEY
"H", ON_DISPLAYMOVABLE, VIRTKEY
"I", ON_HIGHLIGHTIND, VIRTKEY
"I", ON_OPTIONSICONS, VIRTKEY, CONTROL
"J", ON_DISPLAYJUMP, VIRTKEY
"K", ON_DISPLAYUNITS, VIRTKEY
"L", ON_HIGHLIGHTLEADERS, VIRTKEY
"L", ON_LOAD, VIRTKEY, CONTROL
"M", ON_HIGHLIGHTMOVED, VIRTKEY
"M", ON_OPTIONSMENU, VIRTKEY, CONTROL
"N", ON_NEXTSTACK, VIRTKEY
"O", ON_DISPLAYOBJECT, VIRTKEY
"O", ON_SHOWODDS, VIRTKEY, CONTROL
"P", ON_PREVSTACK, VIRTKEY
"Q", ON_DOUBLETIME, VIRTKEY, CONTROL
"Q", ON_HIGHLIGHTHQ, VIRTKEY
"R", ON_DISPLAYFLIP, VIRTKEY
"R", ON_RESOLVE, VIRTKEY, CONTROL
"S", ON_FILESAVE, VIRTKEY, CONTROL
"S", ON_HIGHLIGHTSPOT, VIRTKEY
"T", ON_DISPLAYTHERMO, VIRTKEY
"T", ON_TURNNEXT, VIRTKEY, CONTROL
"U", ON_BUYWHEEL, VIRTKEY, CONTROL
"U", ON_OPTIONSLIST, VIRTKEY
"V", ON_DISPLAYVISIBLE, VIRTKEY
"V", ON_REMOVE, VIRTKEY, CONTROL
"W", ON_DISPLAYCOMMAND, VIRTKEY
"X", ON_HIGHLIGHTFIXED, VIRTKEY
"X", ON_OPTIONSOUTLINE, VIRTKEY, CONTROL
"Y", ON_HIGHLIGHTNOAMMO, VIRTKEY
"Y", ON_TOTOP, VIRTKEY, CONTROL
"Z", ON_HIGHLIGHTORG, VIRTKEY
"Z", ON_TOBOTTOM, VIRTKEY, CONTROL
VK_DELETE, ON_COUNTERCLOCK, VIRTKEY
VK_DOWN, ON_SCROLLDOWN, VIRTKEY
VK_END, ON_BACKWARD, VIRTKEY
VK_F1, ON_GENERAL, VIRTKEY
VK_F2, ON_HANDBOOK, VIRTKEY
VK_F3, ON_DATA, VIRTKEY
VK_F4, ON_PLATOON, VIRTKEY
VK_F5, ON_WEAPON, VIRTKEY
VK_HOME, ON_FORWARD, VIRTKEY
VK_LEFT, ON_SCROLLLEFT, VIRTKEY
VK_NEXT, ON_CLOCKWISE, VIRTKEY
VK_NUMPAD0, ON_LOAD, VIRTKEY
VK_NUMPAD1, ON_MOVEDOWNL, VIRTKEY
VK_NUMPAD2, ON_MOVEDOWN, VIRTKEY
VK_NUMPAD3, ON_MOVEDOWNR, VIRTKEY
VK_NUMPAD4, ON_COUNTERCLOCK, VIRTKEY
VK_NUMPAD6, ON_CLOCKWISE, VIRTKEY
VK_NUMPAD7, ON_MOVEUPL, VIRTKEY
VK_NUMPAD8, ON_MOVEUP, VIRTKEY
VK_NUMPAD9, ON_MOVEUPR, VIRTKEY
VK_RIGHT, ON_SCROLLRIGHT, VIRTKEY
VK_SPACE, ON_RECENTER, VIRTKEY
VK_UP, ON_SCROLLUP, VIRTKEY
VK_NUMPAD5, ON_AIRATTACK, VIRTKEY
You will note that every letter of the alphabet, from A to Z, has been assigned. Virtually without exception, nearly every Menu Bar Display->Highlight(s) option is covered. No more hunting through the top-level game menu to briefly toggle one display or another. They are now all there instantly, at your fingertips! Hooray, more for the left hand to do! (I'm a lefty. [;)])
Here is a screenshot, showing
[*]Unit Bases
[*]Visible Hexes
[*]On-Map Thermometers
[*]Organization
with all of those Display->Highlight ooptions activated/toggled on by way of hot keys, not via menu clicks, else Tool Bar button clicks.

With hot keys, imagine how easy it will be to customize on the fly your unit display exactly as you want it. Toggle this on, toggle that off, ... in hundreds of different combinations. Hot key to your heart's content!
Here are the diffs between the older, traditional hot keys (signified by '<') and the new ones (signified by '>'):
Robert@roberto /cygdrive/c/Temp
$ diff /cygdrive/c/Temp/hotkeys.old /cygdrive/c/Temp/hotkeys.newer
6,7c6,10
< "A", ON_ARRIVED, VIRTKEY
< "B", ON_BANZAI, VIRTKEY
---
> "A", ON_ADDASSAULT, VIRTKEY, CONTROL
> "A", ON_HIGHLIGHTAA, VIRTKEY
> "B", ON_BANZAI, VIRTKEY, CONTROL
> "B", ON_DISPLAYBASES, VIRTKEY
> "C", ON_CLEARASSAULT, VIRTKEY, CONTROL
9,10c12,18
< "D", ON_OPFIRE, VIRTKEY
< "F", ON_RELEASE, VIRTKEY
---
> "D", ON_DIGGINGIN, VIRTKEY, CONTROL
> "D", ON_HIGHLIGHTDISRUPT, VIRTKEY
> "E", ON_HIGHLIGHTMINE, VIRTKEY
> "F", ON_BUYBULLET, VIRTKEY, CONTROL
> "F", ON_HIGHLIGHTFIRED, VIRTKEY
> "G", ON_DAMAGE, VIRTKEY, CONTROL
> "G", ON_DISPLAYRANGE, VIRTKEY
12,13c20,27
< "I", ON_SCENINFO, VIRTKEY
< "M", ON_OPTIONSMENU, VIRTKEY
---
> "I", ON_HIGHLIGHTIND, VIRTKEY
> "I", ON_OPTIONSICONS, VIRTKEY, CONTROL
> "J", ON_DISPLAYJUMP, VIRTKEY
> "K", ON_DISPLAYUNITS, VIRTKEY
> "L", ON_HIGHLIGHTLEADERS, VIRTKEY
> "L", ON_LOAD, VIRTKEY, CONTROL
> "M", ON_HIGHLIGHTMOVED, VIRTKEY
> "M", ON_OPTIONSMENU, VIRTKEY, CONTROL
15a30
> "O", ON_SHOWODDS, VIRTKEY, CONTROL
16a32,33
> "Q", ON_DOUBLETIME, VIRTKEY, CONTROL
> "Q", ON_HIGHLIGHTHQ, VIRTKEY
18c35,37
< "S", ON_SCHEDULED, VIRTKEY
---
> "R", ON_RESOLVE, VIRTKEY, CONTROL
> "S", ON_FILESAVE, VIRTKEY, CONTROL
> "S", ON_HIGHLIGHTSPOT, VIRTKEY
19a39,40
> "T", ON_TURNNEXT, VIRTKEY, CONTROL
> "U", ON_BUYWHEEL, VIRTKEY, CONTROL
21a43
> "V", ON_REMOVE, VIRTKEY, CONTROL
23,24c45,50
< "X", ON_FILEEXIT, VIRTKEY
< "Z", ON_DISPLAYRANGE, VIRTKEY
---
> "X", ON_HIGHLIGHTFIXED, VIRTKEY
> "X", ON_OPTIONSOUTLINE, VIRTKEY, CONTROL
> "Y", ON_HIGHLIGHTNOAMMO, VIRTKEY
> "Y", ON_TOTOP, VIRTKEY, CONTROL
> "Z", ON_HIGHLIGHTORG, VIRTKEY
> "Z", ON_TOBOTTOM, VIRTKEY, CONTROL
As you can see, the following game functions have lost hot-key assignments:
[*]A, ON_ARRIVED
[*]D, ON_OPFIRE
[*]F, ON_RELEASE
[*]I, ON_SCENINFO
[*]S, ON_SCHEDULED
[*]X, ON_FILEEXIT
But those relatively little-used functions can still all be accessed via the Menu Bar.
Here are the reassignments:
[*]G, ON_DISPLAYRANGE (was Z; think: RanGe)
[*]Ctrl-B, ON_BANZAI (was B)
[*]Ctrl-M, ON_OPTIONSMENU (was M)
Here are the brand new assignments:
[*]A, ON_HIGHLIGHTAA (Anti-Aircraft units)
[*]B, ON_DISPLAYBASES
[*]D, ON_HIGHLIGHTDISRUPT
[*]E, ON_HIGHLIGHTMINE (think: Engineers)
[*]F, ON_HIGHLIGHTFIRED
[*]I, ON_HIGHLIGHTIND (Indirect Fire units)
[*]J, ON_DISPLAYJUMP (Jump Map; just like the newer JT games)
[*]K, ON_DISPLAYUNITS (think: Kill unit display)
[*]L, ON_HIGHLIGHTLEADERS
[*]M, ON_HIGHLIGHTMOVED
[*]Q, ON_HIGHLIGHTHQ
[*]S, ON_HIGHLIGHTSPOT (Spotted units)
[*]X, ON_HIGHLIGHTFIXED
[*]Y, ON_HIGHLIGHTNOAMMO (think: No SupplY)
[*]Z, ON_HIGHLIGHTORG (think: OrganiZation)
And still more brand new Ctrl-key combos:
[*]Ctrl-A, ON_ADDASSAULT
[*]Ctrl-C, ON_CLEARASSAULT
[*]Ctrl-D, ON_DIGGINGIN
[*]Ctrl-F, ON_BUYBULLET (Save AP's for Firing)
[*]Ctrl-G, ON_DAMAGE (think: DamaGe Wall or Bridge)
[*]Ctrl-I, ON_OPTIONSICONS (Graphical Unit Icons)
[*]Ctrl-L, ON_LOAD (Load/Unload)
[*]Ctrl-O, ON_SHOWODDS
[*]Ctrl-Q, ON_DOUBLETIME (think: Quicken)
[*]Ctrl-R, ON_RESOLVE (Resolve Assault)
[*]Ctrl-S, ON_FILESAVE
[*]Ctrl-T, ON_TURNNEXT
[*]Ctrl-U, ON_BUYWHEEL (Save AP's for Unloading)
[*]Ctrl-V, ON_REMOVE
[*]Ctrl-X, ON_OPTIONSOUTLINE (think: HeX Outlines)
[*]Ctrl-Y, ON_TOTOP
[*]Ctrl-Z, ON_TOBOTTOM
Any letter/function not listed (such as C, Show Countours; or N, Next Unit; etc.) should be the same as before.
Generally speaking, any simple key presses (no Ctrl- or any other key prefix) should toggle Display->Highlight(s) or some other aspect of the game display only. You can freely press simple hot keys without worrying you will impact units or the game state beyond its appearance. So if you "misremember" or guess wrong, no big deal: You haven't really changed anything; you've just altered the game display.
If there are any functions that might impact the game state -- for example: Double Time unit(s); Load/Unload unit(s); Resolve Assault; etc. -- in general such functions are assigned to Ctrl- key combos. The idea here is: It takes more physical and mental effort to do a Ctrl- key combo, so where you might want to think twice before acting, save that for the Ctrl- key combos.
I decided to use the Ctrl- prefix rather than the Shift- prefix (or even more elaborate prefixes such as Ctrl-Shift-), because -- being at the extreme lower left and lower right of the standard PC keyboard -- the Ctrl- key is easier to see and access than the Shift- key (which is one row up from the Ctrl- key).
Mnemonics. In general, and as much as possible, I tried to have the hot key letter suggest the function. For example, 'M' signifies the Moved Units toggle. But when you've already assigned one key, say 'Ctrl-D' for Digging In, you don't have that letter for some other function, say for Double Time. So you try something otherwise suggestive, such as 'Ctrl-Q' for Quicken. Or maybe use an embedded letter, such as: Display RanGe.
You do the best you can.
These key assignments are generally settled. No second guessing! [:-] [:'(]
I don't know about you, but: I have played around with these new hot keys some, and they are a game changer. With Display->Highlight(s) now so much more easy and convenient -- simple key presses vs. laborious, tiresome mouse sweeps/menu hunt-and-pecks -- I will do them much, much more often. I will become much more aware of: Moved Units, Disrupted Units, Fired/Fought Units, Indirect Fire Units, Headquarter Units, Out of Supply Units, etc., etc. And being more aware, I will be a better player for it. As I said, a game changer.
Eventually, I will implement an in-game Hot Key Reference screen, accessible via the F6 key (likely), to summarize all hot keys. No more hunting through the game docs for the Hot Keys reference. It will be right there, in-game!
BTW, the Tool Bar buttons will have a makeover too. New ones added, perhaps some dropped, maybe all reduced in size so that we have room for more of them. For future development.
Oh, I have something else to show you ... but not now, as it's not quite finished yet. Soon. But in any case, Thank God It's Friday, right?
Until the next time ...




