Praxis_Bot/hotkey_script.py
Alex Orid 994981cfdb First Push
Im so sorry for the bad code T_T

(Also note to self, I deleted the old code)
2020-09-19 23:38:49 -04:00

18 lines
396 B
Python

import pygetwindow as gw
from pynput.keyboard import Key, Controller
import time
keyboard = Controller()
def focusOBS():
gw.Win32Window.activate(gw.getWindowsWithTitle('OBS')[0])
def hotkey_trigger(key_input):
time.sleep(1)
focusOBS()
time.sleep(1)
with keyboard.pressed(Key.ctrl, Key.shift, Key.alt):
keyboard.press(key_input)
keyboard.release(key_input)