Matt Legend Gemmell Modesty is Lying

Mac OS X Cocoa and iPhone Development Services available at Instinctive Code.
Favorites icon
Favorites for iPhone
Speed-dial with style.
Mac OS X Cocoa and iPhone Developer for hire

Other Pages

Categories

Posted
19 February 2006 @ 11pm

Categories
Development, Interface, Source

Tags
, , , , , , ,

Dual Input in Cocoa

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.


7 Comments

Gus Mueller
20 February 2006 @ 2am

Don’t forget to drink some water, or you’ll wake up with a hangover!


Matt
20 February 2006 @ 9am

Truth is, I’ve never had a hangover in my life. I don’t seem to get them at all, which Lauren hates of course.


The Jimbo
21 February 2006 @ 10pm

You’ll need to show me this one Matt… I think we could do some really neet stuff with this dual input malarkey!


The Jimbo
21 February 2006 @ 10pm

I spelt neat wrong… !!!

I definatelt (sic.) need some advise on spelling and grammar… hehe


Mark
22 February 2006 @ 3am

weel it would be cool if this was two mice or three!


Ron
2 March 2006 @ 8am

I hesitate to imagine what you would use to move the third mouse.

(One or the other foot, what?)


Diggory Laycock
7 March 2006 @ 4am

Yay - co-incidentally I’m posting this comment drunk. Posting drunk code is just showing off! p.s. If you ever find that you’re a character in a film and your boss is Sean Bean or Brian Cox - odds on that they are evil….

Maybe that’s not as pertinent as it seems to me right now….


Leave a Comment

Updated iTunes 5 window code (yet again) Sheercore