Class KeyTrigger

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

public class KeyTrigger extends Object implements Trigger
A KeyTrigger is used as a mapping to keyboard keys.
  • Constructor Details

    • 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 Details

    • getName

      public 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.