Docs » Autodocs » keyboard.device » KBD_READEVENT
KBD_READEVENT -- Return the next keyboard event.
Read raw keyboard events from the keyboard and put them in the
data area of the iORequest. If there are no pending keyboard
events, this command will not be satisfied, but if there are
some events, but not as many as can fill IO_LENGTH, the
request will be satisfied with those currently available.
io_Message mn_ReplyPort set if quick I/O is not possible
io_Device preset by the call to OpenDevice
io_Flags IOB_QUICK set if quick I/O is possible
io_Length the size of the io_Data area in bytes: there
are sizeof(inputEvent) bytes per input event.
io_Data a buffer area to fill with input events. The
fields of the input event are:
links the events returned
contains the next key up/down reports
only the shift and numeric pad bits are set
ie_SubClass, ie_X, ie_Y, ie_TimeStamp
are not used, and set to zero
This function sets the error field in the IORequest, and fills
the IORequest with the next keyboard events (but not partial