

This is a global built in package that provides information about the state of the user input devices.
Interface

getDragData

function getDragData(
)
Retrieves the data on the current drag and drop operation.
Return values
(dragdata)
A reference to a
dragdata object, or
nil if no drag is underway
getMouseButtonState

function getMouseButtonState(
button
)
Get the state of the specified mouse button.
Parameters
button (number)
This value specifies the mouse button whose state is being queried and should be 1 for the left mouse button,
2 for the middle button and 3 for the right button
Return values
(boolean)
Returns true if the button is pressed and false if it is not
getMousePosition

function getMousePosition(
)
Retrieve the current mouse pointer coordinates relative to the top left corner of the application window area.
Return values
(number)
The X coordinate of the mouse cursor
(number)
The Y coordinate of the mouse cursor
isAltPressed

function isAltPressed(
)
Check the state of the alt key.
Return values
(boolean)
Returns true if the key is down, false otherwise
isControlPressed

function isControlPressed(
)
Check the state of the control key.
Return values
(boolean)
Returns true if the key is down, false otherwise
isShiftPressed

function isShiftPressed(
)
Check the state of the shift key.
Return values
(boolean)
Returns true if the key is down, false otherwise
onAlt

handler
function onAlt(
pressed
)
Called when the alt key is pressed down or released.
Parameters
pressed (boolean)
A value of true if the key was pressed, or false if it was released
onControl

handler
function onControl(
pressed
)
Called when the control key is pressed down or released.
Parameters
pressed (boolean)
A value of true if the key was pressed, or false if it was released
onShift

handler
function onShift(
pressed
)
Called when the shift key is pressed down or released.
Parameters
pressed (boolean)
A value of true if the key was pressed, or false if it was released