mouse-button-state

Function

Package: common-graphics

Arguments: nil

This function returns an integer whose bits reflect the current state of the mouse buttons and shift keys. The following table shows the correspondence of buttons and keys to constants defined in Allegro CL for Windows.

Button/Key Associated Constant

Left button left-mouse-button

Middle button middle-mouse-button

right button right-mouse-button

shift key shift-key

control key control-key

alt key alt-key

Note: while an event is being handled, the returned value reflects the state at the time that that event occurred. For example, if you call mouse-button-state in an event method for a button-down event, then the returned value will indicate the mouse buttons and shift keys that were pressed when this event occurred, even if the user has released the buttons and keys at the time that the call to mouse-button-state is made.

Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.