Simulate keyup and also capture real keyup?

I've got a bistable switch (i.e. one where you press it once to turn it "on" and again to turn it "off") on my mouse that I'd love to be able to perform two actions. Specifically, I'd love to press it once ("on") to enter insert mode in vim, and press it again ("off") to exit insert mode.

The problem is that while the key is depressed it continuously sends the keydown signal. This makes sense of course, but I'm wondering if there is a way in BTT to ignore the continued keydown, ack only the first instance, then ack the true hardware keyup when that signal comes through.

I don't think this is currently possible in BTT, but if it is I'd love to know how to configure it!