11
Jul
09

Ipod touch WiFi mouse with Python (web app)

You might know it is possible with several applications to turn your iPod Touch or iPhone into a wireless mouse. You download/buy the app in the app store, install the server and voila, finished!

This works perfect, so why did I make another one? I think the problem is that you need a client and a server. Maybe the best option would be making an app that implements the Bluetooth mouse protocol so you can use it as a normal Bluetooth mouse. The problem with that is that I don’t know anything about C or Bluetooth. So I reversed the plan and made a server without the need for a client.

I’ll explain how it works. I wrote a Python app that extends the Python built-in webserver to server an empty html document. Well… almost empty, it only contains some JS to send back the touch events. Back at the server I register the events and move the mouse.

Although ‘move the mouse’ sounds easy, that is the most complicated part of the application. It currently only works for Windows and Mac.

The advantage of using Safari is that it gives us JS access to all touch movement as wel as allowing for portrait and landscape mode and pinch-to-zoom for detailed movement. In the future I might add a text field to send text to the computer, but this would be another cross-platform horror…

You can download the app form my box widget in the sidebar. Just run it with Python and point you iPod touch/iPhone to <computer ip>:3333

Advertisements

1 Response to “Ipod touch WiFi mouse with Python (web app)”



Comments are currently closed.

My blog has moved!

My blog has permanently moved to a self hosted Wordpress at http://pepijndevos.nl

This blog will stay around for accidental search engine visitors.

Me

This is me

Blog Stats

  • 22,482 hits

@PepijnDeVos


%d bloggers like this: