Комментарии:
AutoKey
Ответитьcan you show one where you can toggle a loop code on and off by pressing the same button
ОтветитьHi, Tab Nation, your script is very useful; however, you have not explained to make the 'execute' function to do different things with different combination of keys, could you please make another video to explain this
ОтветитьHrm, interesting.
if I hit SHIFT, nothing happens. SHIFT+A then it runs, but after 5 seconds if I just hit SHIFT it also runs the code.
when I press A it executes program and types A, cant figure out how to make it execute code without typing a hotkey, for example, pressing F1 as a hotkey without trigering "help" feature on a web browser.....
Ответитьthis is 100X better way to do this thing, you're welcome
import keyboard
def f1_Pressed():
print('F1 was pressed')
def f2_Pressed():
print('F2 was pressed')
keyboard.remap_hotkey("F1", "F8")
keyboard.add_hotkey('F1', f1_Pressed)
keyboard.remap_hotkey("F2", "F8")
keyboard.add_hotkey('F2', f2_Pressed)
while True:
keyboard.wait()