Matt Gemmell

CHANGER is available now!

An action-thriller novel — book 1 in the KESTREL series.

★★★★★ — Amazon

Dual Input in Cocoa

development, interface & source 1 min read

I’m not going to lie to you: I’m drunk right now. No question about it. But that didn’t stop me firing up Xcode and creating a little app. This one is strictly for those who have OS X 10.4 or later, plus both a mouse and a Wacom tablet (or another tablet that OS X recognises as such) connected simultaneously. Put your tablet on the right of your computer, and put your mouse on the left (a trackpad works fine as the mouse). Run this little app (source included), and you can control the blue ball with your left hand (mouse/trackpad) and the red ball with your right hand (any connected tablet). Kind of cool in its implications.

Disclaimer: this is really, really rough code. Stuff will jump around. It’s constrained to the screen, and badly too. The logic is broken. It gets choppy with simultaneous input. It’s the product of a developer who is drunk. But the idea is in there. The reason I did this is because I saw The Island the other week, and I really want a digital desk like Sean Bean’s character has (you remember the “Draw it for me” scene, right?). I plan to create a prototype in OS X which supports dual input via a touchscreen. And, as I said, because I’m drunk.

Right now, it’s just a curiosity which I may or may not recall in the morning. But given Apple’s recent patent filings regarding touchscreen devices and contextual on-screen controls, it could potentially be the start of some interesting new ways to interact with your Mac. And now I’m going to bed.