I've pulled together a plugin for Rockbox (http://rockbox.org) that can quack like a duck: http://gerrit.rockbox.org/r/1212
It also extends the scripting language, adding variables and flow control.
However, it has one major limitation: speed. It can only send about 100 keys/second, which is only 20% of the theoretical maximum achievable with USB.
For those of you with supported MP3 players, I suggest that you try it and feel free to ask questions and give feedback!