if (keysBuffered) { text = bufferedKeys + text; keysBuffered = false; bufferedKeys = "";
if (keyboardLocked) {  if(text.equals("[reset]") || text.equals("[sysreq]") || text.equals("[attn]")) { bufferedKeys = ""; keysBuffered = false; } else { keysBuffered = true; if(bufferedKeys == null){ bufferedKeys = text; return; } else { bufferedKeys += text; return; } }
   public void sendKeys(String text) {      if (keysBuffered) {         text = bufferedKeys + text;         keysBuffered = false;         bufferedKeys = "";      }      // check to see if position is in a field and if it is then change      //   current field to that field      isInField(lastPos,true);      strokenizer.setKeyStrokes(text);      String s;      boolean done = false;      while (strokenizer.hasMoreKeyStrokes() && !done) {         s = strokenizer.nextKeyStroke();         if (s.length() == 1) {            simulateKeyStroke(s.charAt(0));         }         else {            if (s != null)               simulateMnemonic(getMnemonicValue(s));            else               System.out.println(" mnemonic " + s);         }         if (keyboardLocked) {            bufferedKeys = strokenizer.getUnprocessedKeyStroked();            if (bufferedKeys != null)               keysBuffered = true;            done = true;         }      }   }