You can use the kbmap to define some keys as mouse buttons. For example, we usually define left ctrl, windows, and alt as mouse 1, 2, and 3. Works just great.
I'm sure you could code it up in Rio's source somewhere, I'm looking for a nice way to simulate a middle click on a single button macbook. :-)
hth
