February 2014
Beginner
1248 pages
62h 25m
English
• Interface KeyListener (p. 494) is used to handle key events (p. 494) that are generated when keys on the keyboard are pressed and released. Method addKeyListener of class Component (p. 525) registers a KeyListener.
• KeyEvent (p. 494) method getKeyCode (p. 528) gets the virtual key code (p. 528) of the pressed key. Class KeyEvent contains virtual key-code constants that represent every key on the keyboard.
• KeyEvent method getKeyText (p. 528) returns a string containing the name of the pressed key.
• KeyEvent method getKeyChar (p. 528) gets the Unicode value of the character typed.
• KeyEvent method isActionKey (p. 528) determines whether the key in an event was an action key (p. 525).
• InputEvent method ...
Read now
Unlock full access