I have a pair of push-buttons and a makey-makey board for a game I’m working on. Could I use Advanced Scene Switcher for a lockout first-button-pushed scenario? I’m hoping to find something that resembles a hotkey, but works only inside one scene instead of globally.
You could do something like this:
You can expand that to as many buttons as you like, plus one more macro that unpauses all of them.
The caveat though, is this:
If the buttons are closer than that, then they take priority in the order that the macros are run.
A more effective way to do this might be to use a physical circuit to detect the first button press - lots of those available through a google search, and they're also used for pinewood derby tracks - and then take your time, comparatively speaking, to translate that into a keypress on a custom keyboard.
(I just took a membrane keyboard apart to try and fix a problem with it. It looks incredibly easy to inject a keystroke into: it has two conductive layers separated by an insulating layer, that has a hole for each key. Connect the conductive layers through that hole, and that's a keypress.)
Or an Arduino variant with native USB might do all of that. (not all do: some have a USB to serial converter on-board, and the CPU chip itself only has serial; that will not work for this) Set it up to be a keyboard on USB, and then your sketch runs a tight loop watching for any button. As soon as it sees one, stop scanning the buttons and decode that one to send as a keystroke.
If you have up to 8 buttons on an 8-bit variant, this becomes easy: accept some weird-looking wiring if necessary to put them all on the same 8-bit port, which can be read all at once. Wait for that port to not be 0 (or 0xFF (255), depending on how you've wired it), then decode the one different bit. If multiple, use a priority scheme, which will probably come naturally from the way you write the sketch anyway, or random to make it more "fair" but takes some extra work on the programming side. Likewise for up to 16 buttons on a 16-bit core, or up to 32 on 32-bit.
Either way, the "only on a specific scene" part is still handled in Adv. SS as above.