Hello there!

I'm just finishing up a code for a piece of hardware I'm currently building and I've come across a situation I'd like to be able to implement, and I imagine it's a fairly simple piece of code away for working!

Essentially, I've got a push button which when pressed outputs a "[" keypress using keyboard.Write.

What I would like is for the button to toggle between outputting first a "[" then a "]".

The idea is this button is to Pause a piece of software, and then to use the same button to resume.

Is this at all possible? And what would the code I'm missing look like?

Thanks!

-Rory Maguire