# Class: KeyListener

### LuxModule: luxinialuacore

A Keylistener receives keyevent callbacks on KeyEvents that are produced by a specific component.

## Methods:

### Method overview:

- 1
- 2
- 3
- 4
- new

new (function callback, boolean onType, onPress, onRelease)
  returns: (KeyListener)

  creates a keylistener that calls the callback function if the Keyeventtype matches the given filter.

  Callbackfunction signature:

       function listener (KeyListener, KeyEvent)

1
  {[function]} - function that is called
2
  {[boolean]} - if true, function is called on releases
3
  {[boolean]} - if true, function is called on pressed
4
  {[boolean]} - if true, function is called on types