hotboard.py 693 B

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