Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Espanso trigger to be used in conjunction with the script test_pynput.py
- # Uses the Python pynput library to inject text, instead of Espanso. Enables the
- # addition of pauses (sleep) and <Tab> etc. keys and can include Espanso {{variables}}
- # See https://pynput.readthedocs.io/en/latest/keyboard.html#controlling-the-keyboard
- # Supports type, tap, press, release, and sleep
- # Whilst you can add to the replace:, anything there will be injected AFTER the script's
- # output
- - trigger: :delay
- replace: '{{output}}'
- vars:
- - name: trig
- type: echo
- params:
- echo: :delay # This must match the trigger text
- - name: input
- type: echo
- params:
- echo: | # Amend the contents below to suit, adding variables etc.
- type Hello, World!
- tap enter
- type Pausing for one second
- tap enter
- sleep 1
- type How are you?
- tap space
- press shift
- type I am a bot
- release shift
- tap enter
- type The trigger was {{trig}}
- tap enter
- - name: output
- type: script
- params:
- args:
- - python
- - '%CONFIG%/scripts/test_pynput.py'
- - '{{trig}}'
- - '{{input}}'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement