I want to trap to media key presses on a Mac, assuming that my script is running in background.
Is that possible? This is what I have.
#!/bin/bash while : do read -t 1 -n 1 key echo $key; done
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
Maybe ask the question in at the Unix & Linux site. Bash scripts behaving similar in Linux and macOS because both systems use Unix. Also consider to use Apple script.