bool IsCtrlPressed { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The IsCtrlPressed property is a static boolean property of the Gizmo class in the Sandbox namespace. It indicates whether the Control (Ctrl) key is currently pressed on the keyboard. This property is useful for detecting user input and modifying behavior based on keyboard modifiers.

Usage

Use the IsCtrlPressed property to check if the Ctrl key is pressed during user interactions. This can be particularly useful in scenarios where you want to implement multi-selection or other Ctrl-modified actions in your application.

Example

// Example usage of IsCtrlPressed property
if (Gizmo.IsCtrlPressed)
{
    // Perform action when Ctrl is pressed
    // For example, enable multi-selection
    EnableMultiSelection();
}
else
{
    // Perform default action
    DisableMultiSelection();
}