K
KevinSimonson
I'm familiar with how one writes code that is executed when the user
clicks or drags a mouse button. How does one write code that is
executed when the user presses a key on the keyboard? I'm not talking
about using the <Scanner> class to detect a string entered terminated
by the <return> key. I want my code to be executed when the user
presses a single key. I used to know how to do this, but I don't have
any existing code that does it any more, and I don't remember the
listener class/interface I need to use. Any pointers anyone can give
me on this would be greatly appreciated.
Kevin S
clicks or drags a mouse button. How does one write code that is
executed when the user presses a key on the keyboard? I'm not talking
about using the <Scanner> class to detect a string entered terminated
by the <return> key. I want my code to be executed when the user
presses a single key. I used to know how to do this, but I don't have
any existing code that does it any more, and I don't remember the
listener class/interface I need to use. Any pointers anyone can give
me on this would be greatly appreciated.
Kevin S