Welcome to JavaRanch, Norman!
Other than your code example not being complete, and that you've misspelled the
nextToken() method, your logic and syntax looks about correct. Was the misspelled method name perhaps the problem?
On a side note, something that I very much appreciated being pointed at when just starting to learn to program in
Java (last week) is
the Java 2 SE API documentation. It details all of the constructors and methods available in each class definition.
Note that the J2SE API documentation doesn't include the Keyboard class you mentioned as it's not part of the official Java libraries (API). I'd guess that you received Keyboard from a book, tutorial, or instructor. I would expect that the originator of the Keyboard class also has JavaDocs available of the same format and style of the J2SE API documentation linked above.
[ March 13, 2004: Message edited by: Dirk Schreckmann ]