David Bakhash's excellent strokes package for Emacs / XEmacs lets you bind gestures (called "strokes") to Emacs commands. Define the up and down strokes to mean scroll-down and scroll-up, a script S to save you files, a circle to compile.

Strokes are expressed by click-dragging with the middle mouse button. You can also define disconnected strokes with the right mouse button (these require a separate button press to tell Emacs you've finished entering them).

Originally it was meant to let you type in characters for languages from the Far East.