Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RaphaZ

macrumors 6502
Original poster
Dec 2, 2021
258
79
Hello!
Is there a way to define the Function F8 (Play and Pause) to Play or Pause the Voice Recorder (which is opened in the background) rather than the Music App?
Thank you.
 
Not that I know of.
FYI; F8 will play/pause other things than Music; like TV app playback, browser youtube stream etc. Seems like it links to the last used app or stream. I just tried it w/Voicerecorder - doesn't work.
 
For the app in the foreground, it’s really easy: System Settings – Keyboard – Keyboard Shortcuts – App Shortcuts – add shortcut for Voice Memos – Play/Pause Recording – F8

For app running in the background, you need a QuickAction and it would be easier if you define it for just one app, let’s say TextEdit (it could be Microsoft Word or another app):

- Automator – New QuickAction – Workflow receives - no input – in TextEdit- add Run AppleScript:

AppleScript:
tell application "VoiceMemos" to activate
tell application "System Events" to keystroke {space}
tell application "TextEdit" to activate

Save the QuickAction as PlayPauseVoiceMemos and go into System Settings – Keyboard – Keyboard Shortcuts – Services – General and add F8 as the shortcut for PlayPauseVoiceMemos.

Now, when you are in TextEdit (or your chosen app), press F8 and you will have to grant TextEdit permission to control System Events. After the permission is granted, pressing F8 in TextEdit will briefly bring VoiceMemos to the foreground, press space (Play/Pause), then bring TextEdit to the foreground again.
 
  • Like
Reactions: BotchQue and RaphaZ
For the app in the foreground, it’s really easy: System Settings – Keyboard – Keyboard Shortcuts – App Shortcuts – add shortcut for Voice Memos – Play/Pause Recording – F8

For app running in the background, you need a QuickAction and it would be easier if you define it for just one app, let’s say TextEdit (it could be Microsoft Word or another app):

- Automator – New QuickAction – Workflow receives - no input – in TextEdit- add Run AppleScript:

AppleScript:
tell application "VoiceMemos" to activate
tell application "System Events" to keystroke {space}
tell application "TextEdit" to activate

Save the QuickAction as PlayPauseVoiceMemos and go into System Settings – Keyboard – Keyboard Shortcuts – Services – General and add F8 as the shortcut for PlayPauseVoiceMemos.

Now, when you are in TextEdit (or your chosen app), press F8 and you will have to grant TextEdit permission to control System Events. After the permission is granted, pressing F8 in TextEdit will briefly bring VoiceMemos to the foreground, press space (Play/Pause), then bring TextEdit to the foreground again.
Wow, thank you!
I thought it would be much easier to configure Function Keys.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.