I believe you can do it using this method:
CODE
@>condition branch: script: Keyboard.trigger(Keys::A)
@>text: Pushed Button A?
@>choices: yes, no
: when [yes]
@>script: Keyboard.trigger(Keys::P)
: when [no]
@>
: branch end
: branch end
@>
Or something like that.
But you can use a script within an event, and I don't know enough about Ruby to know if you have to determine a library prior to using the "Keyboard.trigger" string.