KeyFlags
Overview
The KeyFlags enum represents keyboard modifier keys that can be used in keyboard input handling. These flags identify specific control keys (Ctrl, Alt, Shift) with distinction between left and right variants.
Enum Definition
enum KeyFlags {
    None = "None",     // No modifier key pressed
    LCtrl = "LCtrl",   // Left Control key
    LAlt = "LAlt",     // Left Alt key
    LShift = "LShift", // Left Shift key
    RCtrl = "RCtrl",   // Right Control key
    RAlt = "RAlt",     // Right Alt key
    RShift = "RShift", // Right Shift key
}
Usage
KeyFlags are typically used when defining keyboard shortcuts or handling keyboard input events. They allow for precise control over which modifier keys are required for a specific action.
Example
import { KeyFlags } from 'netdecor-api';
// Checking if a specific modifier key is active
if (keyEvent.modifiers.includes(KeyFlags.LCtrl)) {
    // Handle left Control key being pressed
}
// Creating a keyboard shortcut that requires multiple modifiers
const shortcut = {
    key: 'S',
    modifiers: [KeyFlags.LCtrl, KeyFlags.LShift]
};