Description | Example | Return Message | Group

Async2DKeyboard

Return a string indicating which keys on the keyboard are pressed

Syntax

Async2DKeyboard <ScenarioPath> {On | Off}

Description

The Async2DPick Connect command returns a string indicating which keys on the keyboard are pressed.

  1. Turn on Asynchronous mode using the ConControl Connect command.
  2. Ensure that the 2D Graphics window is the active window.
  3. Send the Async2DKeyboard command.
  4. Connect will return a string indicating which keys on the keyboard are pressed for all open 2D Graphics windows at the time the command was sent.

The keystring returned will contain spaces to separate the window number and the keys pressed.

Note: More than one key can be returned when one of the system keys is pressed.

Example

To turn on the Async2DKeyboard allowing Connect to return information about what keys are pressed:

Async2DKeyboard * On

ReturnMessage

Pressing the a key while the first 2D window is active, will return some something like the following:
1 A
Pressing the i key with the Ctrl key held down, will return some something like the following:
1 Ctrl I
Pressing the j key with the Alt, Ctrl, and Shift keys held down, will return some something like the following:
1 Alt Ctrl Shift J

Group Membership

This command belongs to the following group(s):

2D Graphics Window

Version

5.0

STK Programming Interface 11.0.1