InputAction¶
Inherits |
Description¶
Generates input events at compositor level. Only programs that receive input from the compositor will be able to process them.
The syntax of this action will change at some point in the future.
Warning
Forgetting to release a keyboard key or mouse button can make your session unusable. Using a physical input device will not help.
Release actions should be performed in on: end_cancel actions instead of on: end ones.
Properties¶
Property |
Type |
Description |
Default |
|---|---|---|---|
input |
list(DeviceActions) |
Input actions to perform. |
|
delay |
time |
Delay between each item in the sequence. |
|
DeviceActions¶
Only one property per item allowed.
Property |
Type |
|---|---|
keyboard |
list(KeyboardAction) |
mouse |
list(MouseAction) |
KeyboardAction¶
See Keyboard.
Action |
Description |
|---|---|
|
Press |
|
Release |
|
One or more keys separated by
|
|
Writes |
MouseAction¶
Button list: left, middle, right, back, forward, task, side, extra, extra6, extra7, extra8, extra9, extra10,
extra11, extra12 extra13.
Action |
Description |
|---|---|
|
Same as in KeyboardAction. |
|
Same as in KeyboardAction. |
|
Same as in KeyboardAction. |
|
Move the pointer by (x, y). |
|
Move the pointer by the current delta of a motion trigger. Multiplied by TouchpadEventHandler.delta_multiplier. |
|
Move the pointer to (x, y). |
Known issues¶
Input methods may cause improper processing of keyboard events. Workaround: set
delay,1should be enough.Windows that have just been activated by an action may not process events properly. Workaround: add a SleepAction after the action that caused the activation.
Keyboard text is always processed before keys. Workaround: set
delayor split into multiple actions and add a SleepAction.
Example¶
input:
- keyboard: [ leftctrl+n ]
- mouse: [ left, move_by 10 10 ]
- keyboard: [ text: aaaaaa ]
- keyboard:
- text:
command: date