Well, is there any reason to run this script as a "complex" one, with custom menu?
I mean, you could use a "simple" script, for example:
-- Bracketing test
menu.close()
sleep(2)
camera.shoot()
camera.wait()
display.notify_box("Finished.")
User would trigger the bracketing sequence from the "Run script" menu - no need to assign a shortcut key for it. The scripting backend will create a DryOS task for this script, with no extra effort on your part.
You would still have to define the options for bookends, but... is this something you would change often?
Yes, this suggestion is because of the multitasking limitations of our Lua integration with DryOS (read: it's a hack). It's not trivial to fix this, I've
asked for help a very long time ago, but...
So, your best bet is to keep things simple (within a single task).