hotkeys

bind Win_L with 'd' in tkinter

bind Win_L with 'd' in tkinter Question: from tkinter import * def quit_1(event): print("you pressed Win_L") root.quit() def quit_2(event): print("you pressed Win_L+D") root.quit() root = Tk() root.bind(‘<Win_L>’, quit_1) #working root.bind(‘<Win_L-D>’, quit_2) #not working root.mainloop() How I bind Win_L + D event to a funcction commenting line root.bind(‘Win_L-D’,quit_2) runs the program Asked By: Lakshit Karsoliya || …

Total answers: 1

Python keyboard module add_hotkey doesn't work

Python keyboard module add_hotkey doesn't work Question: I’m trying to run some code from someone else’s GitHub repo, but it wouldn’t work. Eventually I figured out that the "keyboard.add_hotkey" function isn’t working properly on my PC (W10). I wrote this small test script to isolate the issue: import keyboard keyboard.write(‘hehe’) keyboard.add_hotkey(‘a’, lambda: keyboard.write(‘test’)) keyboard.add_hotkey(‘ctrl + …

Total answers: 1