Along the lines of uiIsKeyPressed, except instead of checking to see whether a key is pressed, it toggles whether or not the key is (or whether the game thinks the key is, at least). Also, the same suggestion from this ticket applies here.

assumedpseudonym 5 Jun 2020:

 With this ticket recently having been implemented, I’m going to bump this up to be noticeable.

 (Having something like this would be particularly useful on something like an inertialess drive — press thrustForward to turn on, press thrustForward again (or possibly stop) to turn off.)

assumedpseudonym 22 Apr 2021:

 Bumping for visibility, since I know future release stuff is bad about getting overlooked.