Answer the question
In order to leave comments, you need to log in
Stop playing audio?
There are hot keys on the keyboard, for example: FN + F7 is play / pause. So, how to tell the system in python that you need to press pause?
Answer the question
In order to leave comments, you need to log in
from pynput.Keyboard import Key, Controller
keyboard = Controller()
keyboard.press(Key.media_play_pause)
keyboard.release(Key.media_play_pause)
Buttons for multimedia, launching a browser / search, and a couple more have their own codes (0xA6-B7, you can look here ), which you need to pull in programs.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question