hotboard.pyw 753 B

123456789101112131415161718
  1. import keyboard as kb
  2. import pyautogui as gui
  3. from time import sleep
  4. def _clnrelease():
  5. gui.click()
  6. kb.remove_all_hotkeys()
  7. # !!!!!!!!!print(len(kb.canonicalize('shift, shift')))
  8. sleep(0.05)
  9. kb.restore_state([42, 29])
  10. kb.add_hotkey('shift, shift', lambda: gui.click(), min_time=0.07, timeout=0.17, suppress=False, trigger_on_release=True)
  11. kb.add_hotkey('control, control', lambda: gui.doubleClick(), min_time=0.07, timeout=0.17, suppress=False, trigger_on_release=True)
  12. kb.wait()
  13. #===============================================================================
  14. # wait for shift than wait for another, if diff between is < 0.17 than add_hotkey
  15. #===============================================================================