Skip to content

Instantly share code, notes, and snippets.

@smeech
Last active February 7, 2026 16:22
Show Gist options
  • Select an option

  • Save smeech/ab706b2833bba45a6da2a8e9dc51123a to your computer and use it in GitHub Desktop.

Select an option

Save smeech/ab706b2833bba45a6da2a8e9dc51123a to your computer and use it in GitHub Desktop.
[Simple typer] #espanso #python
# A simple typer to insert text, newlines, tabs, and other characters using
# the Python pynput library. May be used to fill in forms, e.g.
# https://www.roboform.com/filling-test-all-fields
# See https://pynput.readthedocs.io/en/latest/keyboard.html fo reference
matches:
- trigger: ";type"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: |
nohup python3 - << 'EOF' > /dev/null 2>&1 &
from pynput.keyboard import Controller, Key
import time; k = Controller()
t, tp, p, r, sl = k.type, k.tap, k.press, k.release, time.sleep
t("Mr")
tp(Key.tab)
t("John")
tp(Key.tab)
t("P")
tp(Key.tab)
t("Smith")
tp(Key.tab)
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment