This document describes the usage of eventio (download) from whithin PyMOL.
The eventio class can be used to read any kind of input device that is generating events on /dev/input/event* device files.
For example, if you have a common mouse and a trackball mouse you may configure your desktop so only the common mouse will move the pointer and then start the eventio.py class from within PyMOL so it reads the events generated by the trackball and have PyMOL rotate the molecule independent of your mouse movements.
The 3d_controller.py PyMOL extension provides a few commands to start the eventio.py class for certain devices.
For example, on my computer the trackball is connected to the /dev/input/event2 device file and the dialbox to /dev/ttyS0
So after I start PyMOL I type:
trackball 2 dialbox 0
and now I have the dialbox and the trackball manipulating PyMOL.
You may have as many devices as you like (32 max actually)
To configure how a certain device works, ie which PyMOL commands a certain button will trigger, look inside the 3d_controller.py file and change it as you will.
If you have a different device, try using the evio_test.py file from the eventio page to read all type/code it generates and then duplicate one of the *_reader functions in the 3d_controller.py file and modify it to understand your device's type/codes.
| pymol command | Brand/model of device | Brief description of device |
|---|---|---|
| trackball device | Kensington Expert Mouse Pro Trackball | This device has a very big trackball, a scroll-wheel, 4 mouse-buttons and 6 rubber buttons. |
| touchpad device | Cirque SmartCat GlidePoint | This is a standalone touchpad. It has 3 buttons, the right edge emulates the scroll-wheel |
| powermate device | Griffin Technology Powermate | This is a standalone dial. The dial itself is also a button. |
| dialbox device | SGI or Spectragraphics | A legacy dialbox with 8 valuators |