moses-palmer / pynput

Sends virtual input commands
GNU Lesser General Public License v3.0
1.73k stars 243 forks source link

caps lock not working as a global hot key #564

Open num3rical opened 11 months ago

num3rical commented 11 months ago

Description I had a program that worked in the past with a global hotkey that used to activate. If I change the hotkey to anything else, it works fine. But caps lock no longer seems to work as a hotkey.

Platform and pynput version OS: Windows 10 Home v22H2 Pynput 1.7.6

To Reproduce


def on_activate():
        print("works!") #no output when hitting caps lock

hotkeys = keyboard.GlobalHotKeys({
        '<caps_lock>': on_activate})

hotkeys.start()```