On Wed, Mar 29, 2017 at 2:14 PM, David Hibbitts <hibbi...@gmail.com> wrote:

> Thanks for the input everyone. The keyboard input will control jmol/jsmol
> but also do other things, but I do like using arrow keys to rotate the
> structure, for example. Other features can be added later to allow jmol to
> more easily *modify* rather than merely view structures. It's hard to
> imagine these features without a fuller keyboard interface (features
> similar to the structure-editing capabilities of avogadro or materials
> studio).
>

set modelkitmode

allows substantial editing, but perhaps not up to those programs in terms
of interface. Still, you can do a lot. Have you experimented with it?



>
> The javascript version already works perfectly, as keyed events are
> captured by the website (even if jsmol previously has focus) and I'm just
> using javascript to do whatever I want to do (including interacting with
> jsmol via JmolScript calls).
>
> For the java version, the best I've been able to do is: use a function
> which restores focus to the website (so they keyboard commands aren't
> trapped by jmol) whenever 1) a script is executed by jmol using
> ScriptCallback or 2) the users mouse leaves the jmol div (using a
> standard mouseout event in the DOM). This means the user doesn't have to
> "click" off of jmol to restore focus and re-enable the keyboard
> interactions. It doesn't help if the user, for example, uses the mouse to
> rotate the structure and leaves the mouse on jmol the entire time. In
> that instance, jmolnever loses focus and so the keyboard events aren't
> passed to the website.
>

That's clever.


>
> I could use the callbacks more aggressively, for example by using
> pickcallback and hovercallback -- but those are uncommon cases -- what I
> really need is something more encompassing like a "MouseUpCallback" so that
> any time the clicks on jmol I can redirect focus back to the website.
> Unfortunately, that callback doesn't exist in the jmol scripting
> environment.
>
>

> It's hard to know how much any of us should invest in these java-specific
> issues given the aggressive nature of browsers toward javascript -- but my
> website really serves my research group, not the general public, and there
> I can certainly get the users to install Waterfox+JAVA.
>
>
Ah, that is very good to hear. I have been trying to promote the idea that
browser-based Jmol can be very much for local use such as that.

Bob
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to