Accelerators and command stacking

Posted by Ked on Sun 17 Sep 2006 06:32 AM — 3 posts, 16,077 views.

Russia #0
I've noticed a strange connection between changing accelerator bindings for key combination and command line stacking. The problem manifests itself when you have a string not containing a stacking charater assigned to an accelerator and then change it to one containing such a character. This only seems to happen when you load accelerators from a script file, and works correctly when you try it from the command window.

For example, loading a file with the following snippet:


Accelerator ("Ctrl+8", "northneast")
--Accelerator ("Ctrl+8", "north;east")


Hitting Ctrl+8 (with a * alias sending to output defined) produces the expected "northneast" in the output window. Then reloading the script with the second line uncommented:


Accelerator ("Ctrl+8", "northneast")
Accelerator ("Ctrl+8", "north;east")


Will continue to give "northneast" until you go into the respective configuration dialog and change the status of the command stacking option (regardless of whether it was disabled or enabled). Then (without reloading the script) Ctrl+8 produces what it should: either "north" followed by "east" on the next line if you've enabled stacking, or "north;east" if you disabled it.

In other words, this is pretty obscure.
Amended on Sun 17 Sep 2006 06:33 AM by Ked
Australia Forum Administrator #1
Er, yes, and not the sort of thing I expect people to do . :)

I would expect two things:

  • You load accelerators early on (eg. at world open)
  • You don't change command stack characters frequently.


I know this is not what you are describing, but if you made an alias that did:

north;east

And then changed the command stack character from ";" to something else, then that alias would stop working too.
Russia #2
Yeah, this probably isn't something that anyone is likely to ever encounter, as the sequence of coordinated script edits and button clicks kind of guarantees it from happening to anyone sane :)

I just thought it would be a good idea to let you know and document it here in case it turns out to be a sign of more serious trouble at some point.