Configuration¶
InputActions is configured through a YAML configuration file. There are no plans to add a UI in the future.
Important
Breaking changes may be introduced at any time, they will be announced in pull requests and in the release changelog.
Important
If a configuration renders the session unusable, the emergency key combination (backspace+space+enter in any order) can be held for 2 seconds to suspend InputActions until the next config reload. A notification will be sent when triggered.
Configuration file path¶
File candidates (highest priority to lowest):
~/.config/inputactions/config-debug.yaml(debug builds only)/etc/inputactions/config.yaml~/.config/inputactions/config.yaml(created if not present)
If write access to the configuration file by unprivileged programs is not desired, choose the /etc/inputactions/config.yaml file.
Note
The configuration path is only chosen when inputactions-client is started (standalone implementation) or the compositor plugin is loaded
(compositor plugin implementations).
Reloading¶
By default, the configuration is reloaded automatically when the file is modified and a notification is shown when there is an error. To reload the configuration manually, run inputactions config reload.
Issues¶
The inputactions config reload and inputactions config issues commands will show detailed information about any issues with the configuration - errors,
deprecated features and unused properties.
Subproperties¶
a.b in the Property column means that b is a property of a:
a:
b: value
Inheritance¶
Child objects inherit all properties from their parent, add new ones and can be used in properties where an object of the parents’ type is required.
Types¶
Type |
Description |
Examples |
|---|---|---|
bool |
|
|
float |
Floating point number. |
|
function |
A JavaScript function. |
() => {
console.log("a");
}
|
int |
Signed integer, can be negative. |
|
keyboard_key |
See Keyboard scancodes. |
|
regex |
Regular expression. |
|
string |
Text, can be wrapped in |
|
time |
Duration in milliseconds, cannot be negative. |
|
uint |
Unsigned integer, cannot be negative. |
|
enum(value1, value2, …) |
One value from the list of values in brackets. |
|
flags(value1, value2, …) |
List of one or more values from the list of values in brackets. |
[ value1, value2 ]
|
list(type) |
List of elements of type |
[ 1, 2, 3 ]
- 1
- 2
- 3
|
map(key_type, value_type) |
A map ( |
key1: value1
key2: value2
|
point(type) |
Two numeric values (x and y) of type |
|
range(type) |
Range of numbers of type |
|
Structure¶
Bold properties are required, struck through properties are deprecated and will be removed in the future.
Root¶
Property |
Type |
Description |
Default |
|---|---|---|---|
anchors |
For defining YAML anchors without unused property warnings. |
||
autoreload |
bool |
Whether the configuration should be automatically reloaded on file change. |
|
device_rules |
list(DeviceRule) |
Evaluated from bottom to top, each rule applies properties to all devices that satisfy the rule’s conditions. |
|
emergency_combination |
list(keyboard_key) |
Keyboard keys that can be pressed in any order and held for 2 seconds to suspend InputActions until the next config reload. Set to an empty list to disable. |
|
external_variable_access |
bool |
Allow dumping variables by running |
|
notifications.config_error |
bool |
Send a notification when the configuration fails to load. |
|
keyboard |
|||
mouse |
|||
pointer |
|||
scripting.scripts |
list(Script) |
See Scripting. |
|
touchpad |
|||
touchscreen |
EventHandler¶
Script¶
Property |
Type |
Description |
|---|---|---|
source |
string |
The script. |
Speed¶
The defaults may not work for everyone, as they depend on the device’s sensitivity and size.
Property |
Type |
Description |
Default |
|---|---|---|---|
events |
uint |
How many input events to sample in order to determine the speed at which the trigger is performed. The average of each event’s delta is compared against the thresholds below. If the threshold is reached, the trigger is considered to have been performed fast, otherwise slow. Note: No triggers will begin until all events have been sampled. |
|
swipe_threshold |
float |
|
|
pinch_in_threshold |
float |
|
|
pinch_out_threshold |
float |
|
|
rotate_threshold |
float |
|
Example¶
device_rules:
- conditions: $name == Synaptics TM3276-022
pressure_ranges:
thumb: 75
palm: 140
- conditions: $mouse
click_timeout: 50
mouse:
gestures:
# ...
touchpad:
speed:
swipe_threshold: 15
gestures:
- type: pinch
fingers: 2
direction: in
actions:
- plasma_shortcut: kwin,Window Close