public boolean hasNextKeyTyped(){
synchronized (keyLock) {
    return !keysTyped.isEmpty();
  }
}

public boolean hasNextKeyTyped ( ) { synchronized ( keyLock ) { return ! keysTyped . isEmpty ( ) ; } }
returns true if the user has typed a key .
