- Joined
- May 12, 2005
- Messages
- 432
- Awards
- 3
- Age
- 35
- Location
- I might tell you...if I trust you.
- Website
- www.fanfiction.net
Ok, so I did a bunch of work with Java last year in my first year of Computer Science at uni. It was the language they decided to teach us with, but it wasn't the aim of the course. It was more of a tool to teach basic programming methods and the like, so just their chosen medium. Anyway, the point being, I was never taught about more complex/specific stuff like key binding. I want to write a program that accepts individual keystroke input. For example, if the user presses the 'q' key, the program executes a certain method call. What exactly do I need to do to get my program to do something like this?
At the moment, I'm tinkering with the KeyEvent class, but I don't really know what I'm doing. Sun's API isn't very helpful. I think someone decided to skimp on documentation there. Anyway, any help is appreciated. Thanks.
At the moment, I'm tinkering with the KeyEvent class, but I don't really know what I'm doing. Sun's API isn't very helpful. I think someone decided to skimp on documentation there. Anyway, any help is appreciated. Thanks.