The top half of the monitor is the output from the program, and the bottom half is the keyboard and other controls. Touching (right clicking the monitor) the program display part will act like you clicked there with the selected mouse button. Touching a key on the virtual keyboard will act like you typed that key in. To press down shift, alt or control, touch that key twice quickly. Pressed down keys will reset after any key other than shift, alt, or control are pressed, or its pressed again. To change the mouse button, or scroll up or down, just touch the text beside the appropriate label.
You can get it from pastebin at q22zxAU0
It also requires my terminal redirection code, which is on pastebin at QcF6wue6.
The string on the first line of the main program will need to be edited to wherever you downloaded the redirection code to (that's the only thing in the file that needs to be modified).
To run, use the arguments <side/name of monitor> <program to run> [arguments for program]
Note: There are a few limitations. You cannot drag the mouse, because there is no clear way to tell between dragging and separate touches next to each other on a monitor. Also some keys don't exist on the virtual keyboard (e.g. numpad, right control, scroll lock). You can still enter these keys by typing them into the main terminal.
Screenshots:
Spoiler

Monitor terminal running edit

Monitor terminal running the CraftOS shell

Monitor terminal running paint