.. role:: ts-api-decorator

#############
KeyInputEvent
#############

.. js:module:: Event
   :noindex:

.. container:: ts-api-section

   .. js:class:: KeyInputEvent



.. container:: api-index-section

   .. rubric:: Accessors

   .. rst-class:: api-index-list-item api-kind-accessor api-parent-kind-class

   * :js:attr:`~Event.KeyInputEvent.viewKey`



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~Event.KeyInputEvent.getDate`
   * :js:meth:`~Event.KeyInputEvent.getEventType`
   * :js:meth:`~Event.KeyInputEvent.getHandled`
   * :js:meth:`~Event.KeyInputEvent.getKeyCode`
   * :js:meth:`~Event.KeyInputEvent.setHandled`





------------

Accessors
=========

.. container:: ts-api-section

   .. js:function:: viewKey()
      :noindex:



      Get the ViewKey this event is associated with.


      :rtype: ViewKey



Methods
=======

.. rst-class:: ts-api-section

getDate
-------

.. js:method:: KeyInputEvent.getDate()



   Gets the Date this event occurred

   :returns: the event Date


   :rtype: Date

.. rst-class:: ts-api-section

getEventType
------------

.. js:method:: KeyInputEvent.getEventType()



   gets the event type

   :returns: the type of key event


   :rtype: KeyInputType

.. rst-class:: ts-api-section

getHandled
----------

.. js:method:: KeyInputEvent.getHandled()



   Gets the handled state of the event

   :returns: whether the event has been handled


   :rtype: boolean

.. rst-class:: ts-api-section

getKeyCode
----------

.. js:method:: KeyInputEvent.getKeyCode()



   gets the key code

   :returns: the key code of the event


   :rtype: number

.. rst-class:: ts-api-section

setHandled
----------

.. js:method:: KeyInputEvent.setHandled( handled)

   :param handled: Indicates whether this event has been handled.
   :type handled: boolean


   Sets the handled state of the event. When an event has been handled it will not propagate any further


   :rtype: void

