tags:

views:

731

answers:

2

With the MacBook Trackpad I can scroll documents by using two fingers or zoom into the screen with two fingers and Ctrl pressed.

What could be very useful is to move the currently active window with a similar gesture (3 fingers, or 2 fingers + modifier key). Is there an existing tool, script that allows this behaviour? If not, would this be possible to do program? Could you do this with AppleScript?

I'm thinking of something like (pseudocode):

while(true) {
  if (trackpad_move && modifier_key_pressed) {
    window = get_active_window()
    window.moveTo(trackpad[x], trackpad[y])
  }
}

The end result should look a bit like in minority report...

Cheers

+3  A: 

There isn't a publicly supported way to do multitouch gestures in the current version of Mac OS X. There is a private API that offers some support, and Snow Leopard is said to have a public version.

As for accessing other processes' windows, you can do it with the Accessibility API (see this other question).

Chuck
A: 

Something similar was done by a friend of mine, Bridger Maxwell. He created his own multi-touch table with a disassembled LCD monitor and infrared technology. The software he wrote as a demo for the device is called Corkboard, and it is open source. His code, in turn, uses OpenTouch, a framework for multi-modal input devices. I honestly don't know the state of support for particular devices, but I know Bridger used a Mac laptop together with his multi-touch table to run the application itself and process multi-touch events.

Check out this blog post to see videos of the end product in action.

Quinn Taylor