com.jme3.input.controls
Class KeyTrigger

java.lang.Object
  extended by com.jme3.input.controls.KeyTrigger
All Implemented Interfaces:
Trigger

public class KeyTrigger
extends java.lang.Object
implements Trigger

A KeyTrigger is used as a mapping to keyboard keys.


Constructor Summary
KeyTrigger(int keyCode)
          Create a new KeyTrigger for the given keycode.
 
Method Summary
 int getKeyCode()
           
 java.lang.String getName()
           
static int keyHash(int keyCode)
           
 int triggerHashCode()
          Returns the hash code for the trigger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyTrigger

public KeyTrigger(int keyCode)
Create a new KeyTrigger for the given keycode.

Parameters:
keyCode - the code for the key, see constants in KeyInput.
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface Trigger
Returns:
A user friendly name for the trigger.

getKeyCode

public int getKeyCode()

keyHash

public static int keyHash(int keyCode)

triggerHashCode

public int triggerHashCode()
Description copied from interface: Trigger
Returns the hash code for the trigger.

Specified by:
triggerHashCode in interface Trigger
Returns:
the hash code for the trigger.