Last active
February 7, 2026 16:22
-
-
Save smeech/ab706b2833bba45a6da2a8e9dc51123a to your computer and use it in GitHub Desktop.
[Simple typer] #espanso #python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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