954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Keylisteners and + - * /

Im currently using method
getKeyText() and getKeyCode() like this

How do you listen for * - and + with keylisteners.
/ is the only one that works atm the rest won't get recognized for some reason

if(event.getKeyText(event.getKeyCode())).equals("/")){
//do something
}

that method works, but when I try using a + a - or a * nothing happens, maybe whenever I type * - + it isnt getting recognized or something? , like when I try * it places a number in the text field im using instead of showing a multi sign

Gink
Light Poster
46 posts since Feb 2005
Reputation Points: 10
Solved Threads: 0
 

If anyone can write how to listen for - + or * it'd be helpful

Gink
Light Poster
46 posts since Feb 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You