KeyListener only works if you have a GUI component which has focus. Since
Java is cross-platform and some of those platforms may not have consoles (or keyboards for that matter, JavaPhone anyone?) the console capabilities are pretty weak. You can read a single character with InputStream.read(), but you still have to hit "enter" on the end of the line on the console. I once got around this limitation by using JNI. For anything but trivial programs (or UNIX-style utilities), I recommend choosing a real GUI over the console.