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

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: Miguel (migueljmol)
Date: 2004-10-08 13: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-05 17: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 16: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


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to