keyboard icon indicating copy to clipboard operation
keyboard copied to clipboard

Code mutes my speaker volume for no reason

Open haimmm opened this issue 3 years ago • 1 comments

def key_pressed():
    keyboard.add_hotkey('del', pressed_del)
    keyboard.wait()


def pressed_del():
    keyboard.send('shift')
    time.sleep(0.15)
    keyboard.send('a')
    time.sleep(0.15)
    keyboard.send('shift')
    time.sleep(0.1)
    keyboard.send('s')
    for x in range(0, 10):
        keyboard.send('d')
        time.sleep(0.09)



if __name__ == '__main__':
    key_pressed()

When i press delete the code executes but in addition my speaker gets muted and unmuted rapidly, probably for every loop iteration. tested in both pc and laptop and same happened.

haimmm avatar Nov 25 '21 11:11 haimmm

Try run the script after switching the layout to English

Nikrik avatar Jan 09 '24 09:01 Nikrik