As fate has it, I just made a Lua library available a few days ago that deals with dynamics, and with which you can get your specific dynamic with a single keycommand.
Caveat: for the library to run you will need the ConsoleTools framework, which is available as a free limited version perfectly sufficient for this issue.