Mobile-Computer connection and conversion of keys

I wanted to know, is it possible to connect the mobile phone to a computer so that actions in the mobile phone are translated into computer input?

For example, I’d like to tilt my phone forward and for my computer to recognise that as if I were pressing the W key; or perhaps if I pressed a certain button on my phone’s screen/the interface I built on Unity, my computer would recognise that as another button pressed; etc.

Is that doable?

Yes, it’s possible. I don’t see why you wouldn’t be able to implement that.

Right, maybe I should’ve been clearer: how do I do it? How do I connect my mobile phone to a computer app, or some such? I don’t need a full tutorial, but a few links and pointers (or, well, yes, a link to a tutorial :P) would be very helpful!

And if you have some idea other than Unity I’d also be open to it, Unity was just the first one I thought of because I have fiddled with it a bit and I know it can detect the kinds of things I want it to.

Well, you’ll have to write two applications:

  1. An application on phone that will process input and send it over the network
  2. An application on PC which will receive the data from the phone and send it to computer input queue (for example, using SendInput() function)

You could probably use Unity networking for communication.

Thank you very much! I’ll look into it! :slight_smile: