TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How to Play/Pause using spacebar key

    Mac
    1
    1
    147
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Fausto HagenF
      Fausto Hagen
      last edited by

      My favorite and most used command while watching videos on my mac.
      This code line triggers spacebar key, pausing or playing whatever running.

      osascript -e 'tell application "System Events" to key code 49'
      

      49 is the code related to spacebar, if you want to press any other keys look in the following link
      https://eastmanreference.com/complete-list-of-applescript-key-codes

      1 Reply Last reply Reply Quote 1
      • First post
        Last post