Patches item #1037026, was opened at 2004-09-29 23:22
Message generated for change (Comment added) made by wkpark
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379135&aid=1037026&group_id=23629

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Won Kyu Park (wkpark)
Assigned to: Nobody/Anonymous (nobody)
Summary: add KeyListener

Initial Comment:
Hello,

most functions are not used by user.

In the most cases, only 20% functions or less are used
frequently.

KeyListener bind some frequently used functionality or
scripts
------
  private int display_mode=0;
  private String[] display_commands={"spacefill
off;wireframe on","spacefill off;wireframe
0.20","wireframe 0.20;spacefill 20%","spacefill
75%;wireframe off"};
  private boolean vector_mode=false;
  private boolean vibration_mode=false;
  private boolean spin_mode=false;
  private boolean movie_mode=false;

  public void keyTyped(KeyEvent e)
  {
    char keyChar = e.getKeyChar();
    if (keyChar == 'h' || keyChar == 'H') {
       System.err.println("oops");
       // help messages for short cut keys (or HotKeys)
       return;
    }
    //if (standalone == true && (keyChar == 'z' ||
keyChar == 'Z')) {
    //   System.err.println("oops");
    //   destroy();
    //   return;
    //}
    if (keyChar == KeyEvent.CHAR_UNDEFINED)
       return;
    switch(keyChar) {
    case 'm':
    case 'M':
       if (vector_mode) {
         if (vibration_mode) {
           vibration_mode=false;
           script("vibration off");
         } else {
           vibration_mode=true;
           script("vibration on");
         }
         repaint();
         break;
       }
       if (movie_mode) {
           movie_mode=false;
           script("anim off");
       } else {
           movie_mode=true;
           script("anim mode palindrome 2 2;anim on");
       }
       repaint();
       break;
    case 'd':
    case 'D':
       display_mode++;
       display_mode %=4;
       script(display_commands[display_mode]);
       repaint();
       break;
    case 'n':
    case 'N':
       script("frame next");
       break;
    case 'b':
    case 'B':
       script("frame prev");
       break;
    case 'r':
    case 'R':
       if (spin_mode) {
           spin_mode=false;
           script("spin off");
       } else {
           spin_mode=true;
           script("spin on");
       }
       repaint();
       break;
    case 'v':
    case 'V':
       if (vector_mode) {
           vector_mode=false;
           script("vectors off");
       } else {
           vector_mode=true;
           script("vectors on");
       }
       repaint();
       break;
    }
  }
--------

----------------------------------------------------------------------

>Comment By: Won Kyu Park (wkpark)
Date: 2005-07-02 14:30

Message:
Logged In: YES 
user_id=76597

When this features are fully specified ?

I suggest common frequently used features
 * toggle display mode (ball&stick, CPK, wireframe) => D
 * prev/next, with animation movie => ",(<)", ".(>)" "m"
 * vibration animation, multiple vibration modes (with
prev/next)
 * toggle vector => V
 * toggle mesurement (angstrom, nanometer etc.) => U(nit)
 * increase precision => F(loating point)
 * toggle van der waals surfaces => S(urface ?)
 * toggle background (white/black are most frequently used) => B
 * toggle axes => X
 * toggle rotation => R

and toggle Editing mode (not supported yet) :)

----------------------------------------------------------------------

Comment By: Miguel (migueljmol)
Date: 2004-10-08 20:14

Message:
Logged In: YES 
user_id=1050060

I am glad that you are interested in helping. 

I plan to add extensive keyboard support to the JmolApplet
in the future. 

Therefore, I do not want to start implementing keyboard
support at this time. Not until we have fully specified how
it will be used. 


Miguel


----------------------------------------------------------------------

Comment By: Won Kyu Park (wkpark)
Date: 2004-10-06 00:44

Message:
Logged In: YES 
user_id=76597

I dig a old jmol cvs tree and I found that old applet
support a keylistener

http://cvs.sourceforge.net/viewcvs.py/jmol/Jmol/src/org/openscience/jmol/applet/Attic/JmolApplet.java?r1=1.21&r2=1.22

this feature is removed with no proper explanation

----------------------------------------------------------------------

Comment By: Won Kyu Park (wkpark)
Date: 2004-09-29 23:25

Message:
Logged In: YES 
user_id=76597

Oops!

You can test above simple keyListener in the following site.

http://chemie.skku.ac.kr/wiki/jmol.html



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379135&aid=1037026&group_id=23629


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to