NamedKeyStroke Issues and Questions

I’m just starting a new thread to cover any bugs, issues or questions that come up during testing of the new Named KeyStroke feature.

The short answer is no, atm there is no facilty to build up a Named Keystroke with an expression and send it. Currently, you would have to implement this with a set of 4 Triggers.

The longer answer is, maybe, it’s not a bad idea and would be perfect for the scripting element which didn’t quite make it into v3.2.

Brent.

Yes, that would be very cool. It would certainly save having to make several conditional Trigger Actions based on a die result.

Under 3.2 v7898, I am unable to use a keyword in the Layer Property: Reset to level: Key: CTRL C

Just a heads-up,

Flaney

Vassal v3.2, svn7915

Using SendToLocation as example. Any trait with keystroke field will show this bug.

  1. Enter a named keystroke. (named keystroke mode activated upon second non-modifier keystroke)
  2. Click OK to save the trait.
  3. Change/Shorten the named keystroke by pressing backspace.
  4. Click OK to save the trait.

The named keystroke doesn’t change. This bug is trivial, and can be worked around. Simply delete the entire value in the keystroke field, and retype the shorter named keystroke.

It should be a problem with catching the backspace key event.

I recommend:

2 modes when registering keystrokes for “Keyboard Command” value field:

  • NamedKeystrokeMode
  • NormalKeystrokeMode

if (NamedKeystrokeMode is on) { Register backspace keystrokes as a "value editor" keystroke } else { Register normally as a "keystroke input" keystroke }
Incidentally, the backspace keystroke doesn’t seem to be usable/enter-able as a keystroke value.

Hi,
Thanks for finding that bug, I am looking into it.

Basically, you suggestion is how the code works. If you type more than 1 printable character, it switches to Keyword Mode. Clearing the entire field revers to Control Key mode.

No, backspace cannot be used as a Command keystroke.

Have fixed this bug in branch Brent-3.2@7929. Look for the next build from Joel greater than this.

Thus spake Brent Easton:

Have fixed this bug in branch Brent-3.2@7929. Look for the next build
from Joel greater than this.

Merged to trunk@7932. Build uploaded.


J.

Under 3.2 v7932, I am still unable to use a keyword in the Layer Property: Reset to level: Key: resetLevel

After closing the property () and reopening, the keyword is gone; just blank. If one uses a keystroke, like CTRL C, and closes the property, it remains when reopened.

Please take a look,

Flaney

Sorry, I missed this bug. Registered as Bug 4077 - Reset Key in Layer Trait does not save KeyStroke
Fixed in Brent-3.2@7942

Thus spake Brent Easton:

Sorry, I missed this bug. Registered as Bug 4077 - Reset Key in Layer
Trait does not save KeyStroke
Fixed in Brent-3.2@7942

Merged to trunk@7944. New builds uploaded.


J.