Package org.crsh.keyboard

Examples of org.crsh.keyboard.KeyHandler.handle()


  public void handle(KeyType type, int[] sequence) {
    KeyHandler keyHandler = process.getKeyHandler();
    if (keyHandler != null) {
      CRaSHConnector.log.fine("Processing key event " + type + " " + Arrays.toString(sequence));
      try {
        keyHandler.handle(type, sequence);
      }
      catch (Exception e) {
        CRaSHConnector.log.log(Level.SEVERE, "Processing key handler " + keyHandler + " threw an exception", e);
      }
    }
View Full Code Here


          } else {
            KeyHandler keyHandler = processHandler.process.getKeyHandler();
            if (keyHandler != null) {
              KeyType type = key.map();
              try {
                keyHandler.handle(type, key.sequence);
              }
              catch (Throwable t) {
                // Perhaps handle better this and treat error / exception differently
                log.log(Level.SEVERE, "Key handler " + keyHandler + " failure", t);
              }
View Full Code Here

  }

  public BaseProcessContext on(KeyType type, int[] sequence) {
    KeyHandler handler = process.getKeyHandler();
    if (handler != null) {
      handler.handle(type, sequence);
    }
    return this;
  }

  public BaseProcessContext execute() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.