AutoClick::InputStructure
Windows INPUT structure definitions for AutoClick
This module provides Crystal structs that match the Windows INPUT structure used by the SendInput API for mouse and keyboard events.
Constants
INPUT_HARDWARE = 2_u32
INPUT_KEYBOARD = 1_u32
INPUT_MOUSE = 0_u32
Input types
KEYEVENTF_EXTENDEDKEY = 1_u32
Keyboard event flags
KEYEVENTF_KEYUP = 2_u32
KEYEVENTF_SCANCODE = 8_u32
KEYEVENTF_UNICODE = 4_u32
MOUSEEVENTF_ABSOLUTE = 32768_u32
MOUSEEVENTF_HWHEEL = 4096_u32
MOUSEEVENTF_LEFTDOWN = 2_u32
MOUSEEVENTF_LEFTUP = 4_u32
MOUSEEVENTF_MIDDLEDOWN = 32_u32
MOUSEEVENTF_MIDDLEUP = 64_u32
MOUSEEVENTF_MOVE = 1_u32
Mouse event flags
MOUSEEVENTF_RIGHTDOWN = 8_u32
MOUSEEVENTF_RIGHTUP = 16_u32
MOUSEEVENTF_WHEEL = 2048_u32
MOUSEEVENTF_XDOWN = 128_u32
MOUSEEVENTF_XUP = 256_u32
Instance methods
keyboard_input(vk : UInt16, scan : UInt16 = 0_u16, flags : UInt32 = 0_u32, time : UInt32 = 0_u32, extra_info : UInt64 = 0_u64) : Bytes
Create keyboard input structure
- vk: Virtual key code
- scan: Hardware scan code
- flags: Keyboard event flags
- time: Timestamp (0 for system time)
- extra_info: Additional info
left_down_input
Sourceleft_up_input
Sourcemiddle_down_input
Sourcemiddle_up_input
Sourcemouse_input(dx : Int32, dy : Int32, mouse_data : UInt32, dw_flags : UInt32, time : UInt32 = 0_u32, extra_info : UInt64 = 0_u64) : Bytes
Create mouse input structure
- dx: X movement or absolute position
- dy: Y movement or absolute position
- mouse_data: Additional mouse data (wheel delta, etc.)
- dw_flags: Mouse event flags
- time: Timestamp (0 for system time)
- extra_info: Additional info
right_down_input
Sourceright_up_input
SourceSend multiple input events
- inputs: Array of input structure bytes
Send a single input event
- input: Input structure bytes