This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes keyTyped Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "keyTyped" Watch "keyTyped" New topic
Author

keyTyped

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi!
I want to have a counter in the method keyTyped(KeyEvent e)
but I don't want to count 'backspace', 'space', 'escape', F1-F12, 'ctrl', 'shift' and 'tab'.
Is there anyway of doing this?
/Theo
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Of course you can just look the hard way for VK_BACK_SPACE, VK_SPACE, VK_ESCAPE etc and ignore those before you do your counting.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: keyTyped
 
Similar Threads
file write
Aren't Listeners very strange creatures?
keyboard events
Help! About hotkey
Not getting key pressed event.