## pymol-users

 [PyMOL] Powermate dial From: William Scott - 2004-05-08 17:12:37 ```Hi Nat: I am really impressed with Zac's driver and extension, and I probably=20 should get a multi-button trackball. For now, the simplicity (or=20 limitation) of the dial (turn right, turn left, press-while-turning=20 right/left, short click, long click) can be augmented to give some=20 flexibility. For example, you can program a click of the dial to=20 toggle (via a key, in this example F5) to go through various dialsets: def toggle_dial(): \ =A0=A0=A0 if dialset =3D=3D 1 : \ =A0=A0=A0=A0=A0=A0=A0 print "Changing to y" \ =A0=A0=A0=A0=A0=A0=A0 dialy() \ =A0=A0=A0 elif dialset =3D=3D 2 : \ =A0=A0=A0=A0=A0=A0=A0 print "Changing to z" \ =A0=A0=A0=A0=A0=A0=A0 dialz() \ =A0=A0=A0 elif dialset =3D=3D 3 : \ =A0=A0=A0=A0=A0=A0=A0 print "Changing to x" \ =A0=A0=A0=A0=A0=A0=A0 dialx() \ =A0=A0=A0 else: print "Dial assignment isn't working" cmd.set_key ('F5', toggle_dial) You can see how I defined the functions dialx(), dialy(), dialz() and=20 so on here: http://www.chemistry.ucsc.edu/%7Ewgscott/xtal/powermate_pymol_osx.html Doubtless anyone with programming aptitude could improve this=20 drastically. I am guessing that this is platform-independent. As a side note I like the dial because it takes up little desk space,=20 and substituting it for the scroll wheel makes my hand hurt less. Say "hi" to the hate-man for me, Bill ```