This question is too broad, so I'm narrowing it down into specific applications. I know that I can press space bar or p when focus is on the ffmpeg window to pause and resume the audio, but often it is playing something in the background while I have 5 terminal windows, 4 Preview windows, 6 Chrome windows, etc. (so its window is hidden somewhere), and it's convenient if I can pause and resume FFplay using a shortcut key. I have iCanHazShortcut installed which can execute arbitrary commands once a combination of key is pressed, so I wonder if there is a command that can pause FFplay audio. If there is a solution that applies to all command-line applications, please let me know.