Available Triggers
HotKeyTrigger
- class voice_commander.triggers.HotkeyTrigger(hotkey)[source]
Uses AutoHotkey hotkeys to trigger actions.
Availability: Windows
- __init__(hotkey)[source]
- Parameters:
hotkey (
str) – the trigger hotkey – same syntax as AutoHotkey hotkeys
JoystickAxisTrigger
Tip
Use python -m voice_commander joy-axis-info to get joystick index and axis information
- class voice_commander.triggers.JoystickAxisTrigger(axis_name, trigger_mode, trigger_value, joystick_index, polling_frequency=30)[source]
Uses AutoHotkey to monitor joystick axis values and trigger according to specified parameters
Availability: Windows
- __init__(axis_name, trigger_mode, trigger_value, joystick_index, polling_frequency=30)[source]
- Parameters:
axis_name (
str) – The name of the axis to monitor: X, Y, Z, R, U, V, or POVtrigger_mode (
AxisTriggerMode|int) – one ofAxisTriggerMode- controls the logic of trigger gatestrigger_value (
int|float|tuple[int|float,int|float]) – the axis value trigger threshold(s). When usingVALUE_BETWEENmode, use a tuple to specify the lower and upper threshold bounds.joystick_index (
int) – the index of the joystick to monitorpolling_frequency (
int) – how frequently to check axis value (the higher this value is, the lower the delay between checks)