Posted: Mon Sep 12, 2011 8:23 am Post subject: RE:Java Keyboard Event
It seems that he wants the user to be looking at a cmd prompt and being prompted to push an arrow key. He then seems to be wanting to catch the action event and respond to it by outputting text based on what arrow key was pressed.
Sponsor Sponsor
DemonWasp
Posted: Mon Sep 12, 2011 11:10 am Post subject: RE:Java Keyboard Event
Then he may have a difficult time, because that's not what a command prompt is used for. The prompt itself listens to the arrow keys, insert-delete-home-end-pgup-pgdn and other keys. The command prompt is built for line-by-line input, not for listening to individual keys.
If you want to listen to individual keys in an environment like the command prompt, then you will probably have to build the command prompt yourself (a Window with a scrolling text box, usually).
Tony
Posted: Mon Sep 12, 2011 11:35 am Post subject: Re: RE:Java Keyboard Event
DemonWasp @ Mon Sep 12, 2011 11:10 am wrote:
If you want to listen to individual keys in an environment like the command prompt, then you will probably have to build the command prompt yourself