Dear Paul,
thank you for your reply. I thought for several days that you ignored my wishes, but you have not. Actually, a lot of people would be happy with the middle button translation. Your guess is right. I do prop up my head (as many others), or I hold a cup of coffee (as many others). So, how to enable the middle mouse drag for translate? (Chording on the mouse is fine with me, too).

Thanks for the arrow keys for translate.

Maia



Paul Emsley wrote:
Dear Maia,

Maia Cherney wrote:

>  I would like to use only one-button keys, so that I could use only
> one hand when fitting.

Why!? Because the other one is needed to prop up your head, maybe? :-)

http://linuxoutlaws.com/files/dan-jaunty-party-thumb.jpg

I find using my left hand for keyboarding makes things way faster than clicking on icons with the right hand on the mouse.

Well, now help me with key-bindings, please. I need one or two buttons on the mouse for map dragging. Pymol and x-fit use the middle button for translation. It confuses me all the time, when I work in coot after working in pymol. Do you have any unused two-button combinations on the mouse? If it's not possible to touch the mouse buttons in the key-bindings, please help me to program arrow key for translation. Could you give me a script for that, I can't write it myself.



There are no two-button combinations ("chording") on the mouse. I have avoided them so far - it seems an esoteric interface and there have been better ways of providing the necessary functionality.

Middle mouse drag for translate could be enabled as an option, I suppose.

As for the arrow keys for translate, add the following to your ~/.coot file. You might need to tweak zsc. Be slightly careful not to overly dwell with you finger on the button if you do not have a fast processor/graphics card and have a fast key repeat.

Paul.



(let* ((zsc 0.02)
       (screen-coords-nudge
    (lambda (tvm nudge ori)
      (map (lambda (e) (* nudge (apply + (map * e ori)))) tvm)))
       (f (lambda (axes)
        (let ((nudge (* (zoom-factor) zsc))
          (rc (rotation-centre))
          (tvm (transpose-simple-matrix (view-matrix))))
          (apply set-rotation-centre
             (map + rc (screen-coords-nudge tvm nudge axes)))))))

  (add-key-binding "Translate Up"    "Up"    (lambda () (f '(0  1 0))))
  (add-key-binding "Translate Down"  "Down"  (lambda () (f '(0 -1 0))))
  (add-key-binding "Translate Left"  "Left"  (lambda () (f '(-1 0 0))))
  (add-key-binding "Translate Right" "Right" (lambda () (f '( 1 0 0)))))

Reply via email to