the 1 key is buggy. use alt-x
you can use the same key for both. It's stupid to use two keys when you can use one. Key combinations are at a premium, especially ones that work with toggle, and don't do anything else in singleplayer.
Shift-1 is used for strafing. (Slide, like Shivan fighters).
I'd only use 1,2,3,4 and Alt-X. (and maybe D, but I bind that to either Zoom, or Press To Glide)
$Formula: ( every-time
( key-pressed "Alt-X" 0 )
( if-then-else
( = @SwapStatus[0] 0 )
( when
( true )
( change-ship-class
"GTF Hercules Mark II"
"Alpha 1"
)
( modify-variable @SwapStatus[0] 1 )
)
( when
( true )
( change-ship-class
"GTF Hercules"
"Alpha 1"
)
( modify-variable @SwapStatus[0] 0 )
)
)
( key-reset-multiple "Alt-X" )
)
+Name: SwapToggle
+Repeat Count: 1
+Interval: 1
EZ.
*based off the the cloaking toggle one (which just uses change-ship-class), minus all the extra fluff since you don't need delays/transitions

) thanks to mjnmixael
if you're
ADAMANT on using the 1 key you're going to need something like
( and
( key-pressed "1" 0 )
( > ( mission-time-msecs ) @ZWait[-1] )
)
( modify-variable
@ZWait[-1]
( + ( mission-time-msecs ) 500 )
)
instead of just the key-pressed check, in combination with this event
$Formula: ( every-time
( key-pressed "1" 0 )
( key-reset-multiple "1" )
)
+Name: ResetKey
+Repeat Count: 1
+Interval: 1
to make sure the1 key
actually resets.
I am not sure about shift-1, since I actually fly ships with strafe and hence would never use it to toggle events.