If Key.isDown, stay down? Toggle Switch?

How do I make it so that a key down function acts as a hard on/off switch, Instead of the momentary temporary toggle normally associated with “if Key.isdown”

Example: The “CONTROL” key is pressed, gotoAndPlay’s an action, until the key is pressed again, which then gotoAndStop’S the action. Would I still use “if Key.isDown” or something else entirely. I know it’s possible, as I have done it in the past, but for the life of me; can’t remember how!? How do create a key-press to act as on/off switch?

Any pointers would be most appreciated!