Solution to getKeyCode() returns 0 in Java

  Pi Ke        2011-06-06 10:38:11       11,069        0         

The getKeyChar method always returns a valid Unicode character or
CHAR_UNDEFINED. Character input is reported by KEY_TYPED events:
KEY_PRESSED and KEY_RELEASED events are not necessarily associated with
character input. Therefore, the result of the getKeyChar method is
guaranteed to be meaningful only for KEY_TYPED events.

For key pressed and key released events, the getKeyCode method returns
the event's keyCode. For key typed events, the getKeyCode method always
returns VK_UNDEFINED.

JAVA  KEYCODE  0  KEYLISTENER 

       

  RELATED


  0 COMMENT


No comment for this article.



  RANDOM FUN

Project Ara, Another of Google’s Speculation. This time for modular phones

Google is very adamant with the test of their new modular phones, nicknamed as Project Ara. The company is auspicious about the new concept where consumers can design their own phones by assembling parts from different manufacturers. The company is hopeful that there will be 20 to 30 interchangeable