Back to main

 

Function 17 - get the code of the pressed button

 

Takes the code of the pressed button from the buffer.

Options:

  * eax = 17 - function number

Return value:

  * if the buffer is empty, returns eax = 1

  * if the buffer is not empty:

    * the upper 24 bits of the eax contain the identifier of the button (in particular, in ah it turns out to be the low byte of the identifier; if all the buttons have an identifier less than 256, then ah is enough to distinguish)

    * al = 0 - the button was pressed with the left mouse button

    * al = bit corresponding to the mouse button, if not the left

Remarks:

  * "Buffer" stores only one button, when you press a new button, information about the old one is lost.

  * When this function is called, an “buffer empty” response is returned by an application with an inactive window.

  * The return value al corresponds to the state of the mouse buttons in the format of subfunction 2 of function 37 at the moment the button is pressed, except for the low bit (corresponding to the left mouse button), which is reset.

 

Constants for registers:

  eax - SF_GET_BUTTON (17)