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
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