LGUI2:Input Hooks
Input Hooks are similar to Input Bindings in that Event Handlers can be mapped to Input Controls, with some key differences.
Input Bindings are a sort of toggle, where if your current inputs match some set, the input is blocked and the toggle is activated; when the inputs no longer match, the toggle is deactivated. In the context of pressing buttons, that toggle behavior is convenient.
Input Hooks on the other hand do not activate a toggle, but rather pipe all matching input events through a specified Event Handler. Additionally in contrast to Input Bindings, Input Hooks do not block inputs by default. Input Hooks can be restricted to a specific control, a specific device, etc.
Defining an Input Hook
Each Input Binding is defined by a JSON object, enclosed by {}.
Each binding must have at least "control" and "eventHandler"
Input Hook properties | |
---|---|
control | An Input Control definition to match inputs against |
modifiers | (Optional) A set of modifiers to restrict against |
eventHandler | An Event Handler to route inputs through |
keyboardFocus | (Optional) If true, the Input Hook is activated while the element has Keyboard Focus. If neither Mouse or Keyboard focus are specified, the Input Hook is active by default. |
mouseFocus | (Optional) If true, the Input Hook is activated while the element has Mouse Focus (the primary element with mouseover). If neither Mouse or Keyboard focus are specified, the Input Hook is active by default. |
LavishGUI 2 Topics