home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD1.3 / Text_Autodocs / keyboard.doc < prev    next >
Encoding:
Text File  |  1992-09-12  |  4.7 KB  |  173 lines

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