Skip to content

Instantly share code, notes, and snippets.

@ondrejh
Created November 16, 2021 14:28
Show Gist options
  • Save ondrejh/856141f1e7e1167ac0591310eac82304 to your computer and use it in GitHub Desktop.
Save ondrejh/856141f1e7e1167ac0591310eac82304 to your computer and use it in GitHub Desktop.
Script emulating CTRL+TAB pressing every 10 seconds.
#!/usr/bin/python3
from pynput.keyboard import Key, Controller
from time import sleep
if __name__ == "__main__":
keyboard = Controller()
while True:
sleep(10)
keyboard.press(Key.ctrl)
keyboard.press(Key.tab)
sleep(0.1)
keyboard.release(Key.tab)
keyboard.release(Key.ctrl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment