Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone/Android: How to Send Keystrokes To Laptop Over Wifi?

How can I best implement a system for send keystrokes/commands via an iPhone and/or Droid to a desktop or laptop computer via WiFi or bluetooth? There are apps for VLC, Keynote and other applications that do this, so I know it's possible but don't know what technology base to use.

The implementation is probably different on Windows and OS X, but if they could be similar that'd be a big win.

If VNC-type technology is used, that'd be fine but I only need to send key commands and mouse clicks—I don't need to be able to navigate the screen space.

like image 443
james_womack Avatar asked Apr 09 '10 18:04

james_womack


2 Answers

There is an Android app that does exactly what you want, and it is open source. It's called RemoteDroid and it sends keyboard and trackball events from your phone to your PC, and uses the screen as a touchpad. It doesn't do the full VNC thing with a view of the desktop on your phone.

The source is here: http://code.google.com/p/remotedroid/

like image 57
Mark B Avatar answered Sep 27 '22 19:09

Mark B


Assuming you're inquiring about implementation of such a program:

Server

You could write an application that injects keystrokes when given commands over TCP from the mobile device.

What OS is the desktop? Depending on the desktop OS the server solution will likely be different. However, you could write a cross-platform server application using Java and the Robot Class.

Also, if you want Bluetooth connections you will need to use a Bluetooth library. For the most code reuse, try to use a library which supports TCP over Bluetooth so that your command protocol can be reused.

Client

For the client simply write a simple application that sends messages over TCP to the server, which will interpret them and issue the key presses.

like image 33
Ben S Avatar answered Sep 27 '22 17:09

Ben S