========
kbd_hidd
========

.. This document is automatically generated. Don't edit it!

`Index <index>`_

----------

Classes
-------

+ `CLID_HW_Kbd`_
+ `CLID_Hidd_Kbd`_

----------

CLID_HW_Kbd
-----------

========================================== ========================================== ========================================== ========================================== 
`--background_kbdsubsystem--`_             `--hardware_drivers--`_                    
========================================== ========================================== ========================================== ========================================== 

-----------

--background_kbdsubsystem--
===========================

Notes
~~~~~
::

     This class represents a keyboard input subsystem in AROS. Additionally
     it serves as a "hub" for collecting input from various keyboard devices
     in the system. Events from all keyboard devices are merged into a single
     stream and propagated to all clients.

     In order to get an access to keyboard input subsystem you need to
     create an object of CLID_HW_Kbd class. The actual returned object is a
     singletone, you do not have to dispose it, and every call will return
     the same object pointer. After getting this object, you can, for example,
     register your driver using moHW_AddDriver method, or enumerate drivers
     using moHW_EnumDrivers.

     If you wish to receive keyboard events, use objects of CLID_Hidd_Kbd
     class. This class implements the same interface as driver class, but
     represents receiver's side and is responsible for registering user's
     interrupt handler in the listeners chain. These objects are not real
     drivers and do not need to me registered within the subsystem.



----------

--hardware_drivers--
====================

Notes
~~~~~
::

     A hardware driver should be a subclass of CLID_Hidd_Kbd and implement IID_Hidd_Kbd
     interface according to the following rules:

     1. A single object of driver class represents a single hardware unit.
     2. A single driver object maintains a single callback address (passed to it
        using aoHidd_Input_IrqHandler). Under normal conditions this callback is supplied
        by CLID_Hidd_Input class.



CLID_Hidd_Kbd
-------------

========================================== ========================================== ========================================== ========================================== 
`--background_kbdclass--`_                 
========================================== ========================================== ========================================== ========================================== 

-----------

--background_kbdclass--
=======================

Notes
~~~~~
::

     Instances of this class are virtual devices being clients of the
     keyboard input subsystem. In order to receive keyboard events, you
     have to create an object of this class and supply a callback using
     aoHidd_Input_IrqHandler attribute. After this your callback will be
     called every time the event arrives until you dispose your object.

     Every client receives events from all keyboard devices merged into
     a single stream.

     Keyboard event handlers are specified by passing the aHidd_Input_IrqHandler attrib,
     The handler will be called every time a keyboard event occurs.  Handlers
     should be declared using 'C' calling conventions,
     e.g.:

     void KeyboardIRQ(APTR data, struct pHidd_Kbd_Event *event)

     Handler parameters are:
         data    - The handler will be called with this set to the value
                   defined using the aoHidd_Input_IrqHandlerData attribute.
         event - A pointer to a read-only event descriptor structure with the following
                   contents:
            flags - The input handlers flags
                   currently supported flags are -:
                   KBD_NOCAPSUP - The keyboard does not generate an UP event for Caps Lock.
            code - The raw key code as specified in devices/rawkeycodes.h.
                   A key 'release' event is indicated by OR'ing this value
                   with IECODE_UP_PREFIX (defined in devices/inputevent.h)

     The handler is called inside interrupts, so usual restrictions apply to it.



See also
~~~~~~~~

`aoHidd_Input_IrqHandler`_ `aoHidd_Input_IrqHandlerData`_ 

