Editing this nearly in full because my knowledge has changed and there are no replies anyway.
So I now know that it's possible to run an application from Android and use that as an input for a computer, like with Unified Remote. But now my question is how is this done? How would I code a program that simply does exactly what Unified Remote does