Keylisteners and + - * /

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Feb 2005
Posts: 46
Reputation: Gink is an unknown quantity at this point 
Solved Threads: 0
Gink Gink is offline Offline
Light Poster

Keylisteners and + - * /

 
0
  #1
Feb 13th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 46
Reputation: Gink is an unknown quantity at this point 
Solved Threads: 0
Gink Gink is offline Offline
Light Poster

Re: Keylisteners and + - * /

 
0
  #2
Feb 13th, 2005
If anyone can write how to listen for - + or * it'd be helpful
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1538 | Replies: 1
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC