Many thanks for providing the script.  I've modified your script using the 
documented "set-scroll-wheel-map" in place of "set-scrollable-map" and placed 
the code in the keybindings.scm file that is read on start-up.  Unfortunately I 
don't have it working yet with coot 0.6.1.  Not sure what I'm doing wrong.  
Should script work with only two maps loaded?

-Mark

On Apr 9, 2010, at 4:45 PM, Judit Debreczeni wrote:

>> Does anyone have a script to assign a key to step the map number connected 
>> to the scroll wheel?  The scheme commands exist and I thought someone may 
>> have done this already. It seems like an obvious shortcut.
>> 
>> Thanks, Mark
> 
> 
> If you mean stepping to another map and making that scrollable, this
> might do what you want:
> 
> ---
> (add-key-binding "Step scrollable map number" "M" (lambda()
>   (let ((maps    (map-molecule-list))
>         (current (scroll-wheel-map)))
>     (if (not (null? maps))
>         (let ((l (memq current maps)))
>            (if (> (length l) 1) (set-scrollable-map (cadr l))
>                (set-scrollable-map (car maps))))))))
> ---
> (Strangely, this doesn't update the scrolling radio button in the
> display manager...)
> 
> If it's just about changing the current scrollable map's contour
> level, that can already be done with + and - on the keyboard.
> 
> JED.

Reply via email to