问题
I'm writing a game based on terminal and I want capture keyboard event, such as w/a/s/d as direction of Up/Left/Below/Right, rather then readLine
a input stream with a Enter key.
Besides, I have read swing package, it has some KeyListener
interface but it seems must bind with swing UI.
Does there have pure keyboard event without other technology binding in java world?
来源:https://stackoverflow.com/questions/41938109/how-to-capture-keyboard-event-without-enter-key-in-java-scala