Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter FifteenWindows/OS Functions (continued)

15.4 Keyboard and Mouse Input

15.4.1 Overview

Generally, user input is processed via Windows messages, via dialog controls and various window classes. However, the keyboard and can be directly accessed via a number of functions. For example, a script can peek at a specific key to see if it is pressed or to check the mouse position. In addition, keyboard and mouse actions can be sent back to a program, including the host.

15.4.2 Keyboard Operations

Keyboard keys are referenced at a low and mid-level within Legato via Windows virtual keys. A virtual key specifies a position on the keyboard or human interface device (HID). At a low-level, there is no ‘a’ and ‘A’ characters, only the ‘A’ virtual key and the virtual key ‘Shift’, which when interpreted. make the pressing of the ‘A’ key a lowercase or uppercase character. Various keys are defined in the Legato SDK (based on the Windows SDK) and are listed in Appendix A — Legato SDK Standard Definitions. Common keys are VK_SHIFT, VK_CONTROL, letters such as VK_O, or numbers such as VK_7. Note that the numeric keypad has different key codes that the top row of numbers on the keyboard.

15.4.3 Mouse Operations

(Reserved)

15.4.4 Functions

Keyboard: 

IsKeyPressed — Reads the state of a specific keyboard code.

Mouse:

GetCursorPosition — Returns the current caret position in screen or client coordinates.