jQuery in Action, 3rd edition
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


Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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?
Cindy Glass
"The Hood"

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
I agree. Here's the link: http://aspose.com/file-tools
subject: keyTyped
It's not a secret anymore!