It looks like you've pretty much got it done. You just have to issue a PREINPUT for each line of input.
If you have the users set up the Fkey responses into a file, they can make them pretty much as long as they want. In the command processor program, you just get to read the file, and loop through each line, putting it into the PREINPUT (type-ahead) buffer.
If you set it up as multiple lines, that can go for as many lines as they've defined. If you give them an editable space, you can search for end-of-line, and process each that way.