The following should do the trick.
There are 4 translators. Two with note-on and two with note-off using the same note value.
The first translator handles Z down (with repeat). As long as you are holding the key down, Z keeps repeating at the rate of key repeat of your OS.
The second translator releases the key Z
The first two translators only fire if the value of ga is 0 ( the startup default).
The second two translators do the same for X, however the last translator toggles the value of ga. So that the second key is only pressed if ga=1.
The key to this working is the toggling the value of ga in the rules of last translor so that only one pair of translators fires depending on the keystroke you want.
I hope this helps.
Bome Customer Care
Also available for paid consulting services: firstname.lastname@example.org