.. a7 GView class

.. _ginput-label:

Class GInput
============
This class represents an input handler. An input handler receives mouse and keyboard 
information, and makes it available to the user.  To access mouse information, simply 
access the attribute ``touch``. To access keyboard information, use the method ``is_key_down``.
    
**You should never construct an object of this class**.  Creating a new instance of 
this class will not properly hook it up to the keyboard and mouse.  Instead, you should 
only use the one provided in the ``input`` attribute of :ref:`GameApp <game-label>`. See that class 
for more information.

Constructor
-----------
.. autoclass:: game2d.GInput

Attributes
----------

.. currentmodule:: game2d
.. autoattribute:: GInput.touch_enabled
.. autoattribute:: GInput.keyboard_enabled

Immutable Attributes
--------------------

.. currentmodule:: game2d
.. autoattribute:: GInput.touch
.. autoattribute:: GInput.key_count
.. autoattribute:: GInput.keys

Methods
-------

.. currentmodule:: game2d
.. automethod:: GInput.is_key_down
.. automethod:: GInput.is_touch_down


:ref:`Return to top level <top-label>`