home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / inc&ad2.0 / text_autodocs / keyboard.doc < prev    next >
Text File  |  1992-09-01  |  5KB  |  168 lines

  1. TABLE OF CONTENTS
  2.  
  3. keyboard.device/CMD_CLEAR
  4. keyboard.device/KBD_ADDRESETHANDLER
  5. keyboard.device/KBD_READEVENT
  6. keyboard.device/KBD_READMATRIX
  7. keyboard.device/KBD_REMRESETHANDLER
  8. keyboard.device/KBD_RESETHANDLERDONE
  9. keyboard.device/CMD_CLEAR                           keyboard.device/CMD_CLEAR
  10.  
  11.    NAME
  12.     CMD_CLEAR -- Clear the keyboard input buffer.
  13.  
  14.    FUNCTION
  15.     Remove from the input buffer any keys transitions waiting to
  16.     satisfy read requests.
  17.  
  18.    IO REQUEST
  19.     io_Message    mn_ReplyPort set if quick I/O is not possible
  20.     io_Device    preset by the call to OpenDevice
  21.     io_Command    CMD_CLEAR
  22.     io_Flags    IOB_QUICK set if quick I/O is possible
  23.  
  24. keyboard.device/KBD_ADDRESETHANDLER       keyboard.device/KBD_ADDRESETHANDLER
  25.  
  26.    NAME
  27.     KBD_ADDRESETHANDLER -- Add a keyboard reset handler.
  28.  
  29.    FUNCTION
  30.     Add a function to the list of functions called to clean up
  31.     before a hard reset generated at the keyboard.  The reset
  32.     handler is called as:
  33.         ResetHandler(handlerData)
  34.                      a1
  35.  
  36.    IO REQUEST
  37.     io_Message    mn_ReplyPort set
  38.     io_Device    preset by OpenDevice
  39.     io_Unit        preset by OpenDevice
  40.     io_Command    KBD_ADDRESETHANDLER
  41.     io_Data        a pointer to an interrupt structure.
  42.         is_Data     the handlerData pointer described above
  43.         is_Code    the Handler function address
  44.  
  45.    NOTES
  46.     Few of the Amiga keyboard models generate the communication codes
  47.     used to implement this reset processing.  Specifically, only the
  48.     Euro a1000 (rare), and the B2000 keyboard generate them.
  49.  
  50.     The interrupt structure is kept by the keyboard device until a
  51.     RemResetHandler command is satisfied for it, but the
  52.     KBD_ADDRESETHANDLER command itself is replied immediately.
  53.  
  54. keyboard.device/KBD_READEVENT                   keyboard.device/KBD_READEVENT
  55.  
  56.    NAME
  57.     KBD_READEVENT -- Return the next keyboard event.
  58.  
  59.    FUNCTION
  60.     Read raw keyboard events from the keyboard and put them in the
  61.     data area of the iORequest.  If there are no pending keyboard
  62.     events, this command will not be satisfied, but if there are
  63.     some events, but not as many as can fill IO_LENGTH, the
  64.     request will be satisfied with those currently available.
  65.  
  66.    IO REQUEST
  67.     io_Message    mn_ReplyPort set if quick I/O is not possible
  68.     io_Device    preset by the call to OpenDevice
  69.     io_Command    KBD_READEVENT
  70.     io_Flags    IOB_QUICK set if quick I/O is possible
  71.     io_Length    the size of the io_Data area in bytes: there
  72.             are sizeof(inputEvent) bytes per input event.
  73.     io_Data        a buffer area to fill with input events.  The
  74.             fields of the input event are:
  75.         ie_NextEvent
  76.             links the events returned
  77.         ie_Class
  78.             is IECLASS_RAWKEY
  79.         ie_Code 
  80.             contains the next key up/down reports
  81.         ie_Qualifier 
  82.             only the shift and numeric pad bits are set
  83.         ie_SubClass, ie_X, ie_Y, ie_TimeStamp 
  84.             are not used, and set to zero
  85.  
  86.    RESULTS
  87.     This function sets the error field in the IORequest, and fills
  88.     the IORequest with the next keyboard events (but not partial
  89.     events).
  90.  
  91. keyboard.device/KBD_READMATRIX                 keyboard.device/KBD_READMATRIX
  92.  
  93.    NAME
  94.     KBD_READMATRIX -- Read the current keyboard key matrix.
  95.  
  96.    FUNCTION
  97.     This function reads the up/down state of every key in the
  98.     key matrix.
  99.  
  100.    IO REQUEST INPUT
  101.     io_Message    mn_ReplyPort set if quick I/O is not possible
  102.     io_Device    preset by the call to OpenDevice
  103.     io_Command    KBD_READMATRIX
  104.     io_Flags    IOB_QUICK set if quick I/O is possible
  105.     io_Length    the size of the io_Data area in bytes: this
  106.             must be big enough to hold the key matrix.
  107.     io_Data        a buffer area to fill with the key matrix:
  108.             an array of bytes whose component bits reflect
  109.             each keys state: the state of the key for
  110.             keycode n is at bit (n MOD 8) in byte
  111.             (n DIV 8) of this matrix.
  112.  
  113.    IO REQUEST OUTPUT
  114.     io_Error
  115.          IOERR_BADLENGTH - the io_Length was not exactly 13 bytes.
  116.             The buffer is unchanged.  This is only returned
  117.             by V33/V34 kickstart.
  118.     io_Actual    the number of bytes filled in io_Data with key
  119.             matrix data, i.e. the minimum of the supplied
  120.             length and the internal key matrix size.
  121.  
  122.    NOTE
  123.     For V33/V34 Kickstart, io_Length must be set to exactly 13 bytes.
  124.  
  125.    RESULTS
  126.     This function sets the error field in the IORequest, and sets
  127.     matrix to the current key matrix.
  128.  
  129. keyboard.device/KBD_REMRESETHANDLER       keyboard.device/KBD_REMRESETHANDLER
  130.  
  131.    NAME
  132.     KBD_REMRESETHANDLER -- Remove a keyboard reset handler.
  133.  
  134.    FUNCTION
  135.     Remove a function previously added to the list of reset
  136.     handler functions with KBD_ADDRESETHANDLER.
  137.  
  138.    IO REQUEST
  139.     io_Message    mn_ReplyPort set
  140.     io_Device    preset by OpenDevice
  141.     io_Unit        preset by OpenDevice
  142.     io_Command    KBD_REMRESETHANDLER
  143.     io_Data        a pointer to the handler interrupt structure.
  144.  
  145. keyboard.device/KBD_RESETHANDLERDONE     keyboard.device/KBD_RESETHANDLERDONE
  146.  
  147.    NAME
  148.     KBD_RESETHANDLERDONE -- Indicate that reset handling is done.
  149.  
  150.    FUNCTION
  151.     Indicate that reset cleanup associated with the handler has
  152.     completed.  This command should be issued by all keyboard
  153.     reset handlers so that the reset may proceed.
  154.  
  155.    IO REQUEST
  156.     io_Message    mn_ReplyPort set
  157.     io_Device    preset by OpenDevice
  158.     io_Unit        preset by OpenDevice
  159.     io_Command    KBD_RESETHANDLERDONE
  160.     io_Data        a pointer to the handler interrupt structure.
  161.  
  162.    NOTES
  163.     The keyboard processor itself performs the hardware reset, and
  164.     will time out and perform the reset even if some reset handlers
  165.     have not indicated yet that the reset may proceed.  This
  166.     timeout is several seconds.
  167.  
  168.