I’m setting up a new team configuration and I’m running into the dreaded “Key pool exhausted” situation. I’ve looked through the GCP forums and this is what I “think” the situation is with key pools:
There are three distinct sets of key bindings:
Binding Type 1: Key bindings for GCP commands… these are the keys set via the Views -> Keys mini keyboard or via the Views -> Advanced “Key Assigned to Selected Command”. When GCP is running and you press these keys, the written GCP command is executed.
Binding Type 2: Key bindings that GCP generates for all the “underlying” macros that it will send to the WoW game for each of the team’s character’s GCP commands.
Binding Type 3: Key bindings that are set inside each WoW game (Options -> Key Bindings). These include things like movement keys, targeting functions, interface panel functions, etc.
I think that the key pool exhausted situation occurs when the Binding Type 2’s overlap or conflict with Binding Type 3. And this becomes more and more likely if lots more Binding Type 1’s are created.
However, with this understanding, I’m still getting the key pool exhausted configuration error. I go to Views -> Advanced and check the debug box and Preview it to see what the Binding Type 2’s are being done. And then I logged into all the characters in the team (singly without GCP) and checked the in-game WoW keybindings (Binding Type 3’s) and verify that none of them overlap or conflict with the ones listed in the dumpfile.txt.
I believe that if GCP is “Active” the Binding Type 1 key bindings trump or override any existing WoW bindings (Binding Type 3) that may exist for the same key bindings. For example, the default WoW binding for Chat Page Up is the “Page Up” key. And in GCP the same key is for initiating the Broadcast mode. And if GCP is not Active, then the WoW key bindings will take effect.
I then thought to look at my WoW AddOns folder and viewed the GameCommandPro1.lua file. I noticed that my second healer’s third healing spell wasn’t assigned any keybinding… so, I removed that spell from the GCP heal commands for all my toons. And, magically, the key pool exhausted error went away.
However, I have no idea why this fixed this issue, why wasn’t the druid’s Regrowth spell able to be assigned a key binding in the addon’s lua file? How can I get this functionality back without "breaking" GCP?
With my current GCP commands loaded in, I have 113 Commands Loaded… (this is with Regrowth, the third healing spell of the second healer, removed). Is there a hard limit to the number of commands that can be passed by GCP to WoW? If so, what is that limit?
Thanks much!
~BlueGriffon



Key bindings in GCP
Essentially you are correct. I'll explain how GCP handles keys:
If a key has a command bound to it, then GCP runs the command (commands are created by wizards, spells, rotations, and - in broadcast mode - broadcast keys are really mapped to a GCP generated command). Which characters are affected by the command are determined by the command. If the command doesn't specify which characters are affected by it, then it will operate on the currently active character.
If a key is a special key (QWEASD by default - or changed by an in file command) then the affected characters are defined by the modifier. Without a modifier, the key is sent to the current character, with shift the key is sent to the alts, with control to the "assistant" and with alt to the "spare" - assistant and spare can be set by GCP commands.
If none of the above apply, then the key is sent to the current character.
The key pool only affects the "command bindings" as in case one. What happens is that when you create a command (remember commands are created by a number of different parts of GCP), GCP does the following:
The command is split into GCP code and game code. Essentially certain commands can be executed by GCP, and others (e.g. casting a spell) need to be executed within the game. GCP code is stored and run locally. Game code is written to the command GameCommandPro1.lua. When you reload the UI, this file is read and executed as a series of GCP mod commands (the GCP mod has its own pseudo language) which loads each of the game commands for each character into a special data construct. When the GCP mod loads a game command, it binds it to a key, and GCP "remembers" which key is associated with each command. Now, when GCP is executing a command, and gets to a "game" instruction, it sends the bound key to whichever characters are affected by the command, and because of the key binding, the GCP mod runs that instruction.
If you edit a command, and the game code is affected, GCP will prompt for an upload. If only GCP code is affected, it will not. This is why you only need to upload on certain occasions.
So the pool keys are keys that GCP can use for its internal purposes. You can still bind those keys in GCP (GCP input keys and output keys are completely separate). The only exception to this is if you wish to bind a key "In Game", GCP can't use it as a pool key.
All is well so far, but there is a problem. Say you bind a key to shift F1, and GCP chooses control-g as the pool key. This combination will work fine on the alts, but on the main it will fail. This is because the active copy of WoW scans the physical keyboard. So we send control-g, but WoW notices that the shift key is down, so will read it as shift-control-g. The inactive wow windows do not do this, and will work normally.
So, when you bind a key such as shift-F1, GCP has to use a pool key with the same modifier (i.e. shift-g is ok, but control-g, alt-g,shift-control-g etc are not) - as you can see, binding to shifted keys severely reduces GCP's choice of pool keys.
If you bind many modified keys, you can quickly exhaust the pool keys for that modifier, even though there are many keys still left in the full pool.
Currently we just use all pool keys as a single collection. I'm thinking that, if I add a priority to the keys, then I can control the order in which keys are allocated, thus saving keys such as shift-g until the less likely keys (such as control-shift-alt-g) have been allocated. Maybe GCP can scan the bound keys first, to assign the priorities (i.e. if you bind many shift combinations and some control-shift combinations, then GCP could make shift the lowest priority, control-shift next lowest, and leave everything else highest.
I'll have a go at this, and maybe load it into a "test" area of the site so you can have a play before I cause general mayhem by releasing it.
Phil
Designer Of GameCommanderPro - www.GameCommanderPro.com
Designer Of KeyBlaster - www.keyblaster.com