org.jrabbit.base.input
Interface KeyboardListener


public interface KeyboardListener

A KeyboardListener is an interface used to provide automatic notification of Keyboard events. To receive notifications, add a listener to KeyboardHandler. If the object receiving updates is no longer being used, remove it from the KeyboardHandler.

Author:
Chris Molini

Method Summary
 void characterEntered(char character)
          Notifies the KeyboardListener when a character is typed.
 void keyPressed(int key)
          Notifies the KeyboardListener when a key is initially pressed.
 void keyReleased(int key)
          Notifies the KeyboardListener when a key is released.
 

Method Detail

keyPressed

void keyPressed(int key)
Notifies the KeyboardListener when a key is initially pressed.

Parameters:
key - The ID of the key being pressed (as in Keyboard).

keyReleased

void keyReleased(int key)
Notifies the KeyboardListener when a key is released.

Parameters:
key - The ID of the key being released (as in Keyboard).

characterEntered

void characterEntered(char character)
Notifies the KeyboardListener when a character is typed.

Parameters:
character - The character that was typed.