Search code examples
macostrackpad

MacBook Trackpad Gestures: Move Windows like in Minority Report


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


Solution

  • 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).