Benches Apps and software

1

quicktime x shortcut key to jump back/for…

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Hi, does anyone know if there is a keyboard shortcut to jump backwards or forwards while playing? Ideally by defineable time interfals (10s, 60s, 300s)?

1 reply

Sign in or join Beachball Help to reply.

  1. 0

    Roote

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Create your own keyboard shortcuts. Copy and paste the AppleScript below into a new Script Editor document. Compile it by clicking the compile button (hammer icon) in the toolbar. Open a video or audio file in Quicktime for testing that is at least a few minutes long. Run the script in Script Editor by clicking the run button (play icon ▶︎). If the script compiles and runs with the expected result, save it to your Scripts folder (/Users/<short user name>/Library/Scripts) as either a script or text. I usually save it as text so that I can read it with Quick Look although it needs to be compiled each time it is opened in Script Editor. Use a brief, descriptive filename; for example "QT_fwd_30_sec". Go on to create the keyboard shortcut.

    My preferred tool for launching scripts via keyboard shortcut is FastScripts. It’s free with ten keyboard shortcuts. Download and install. Click on the FastScripts menulet in the menubar. Hold down the ⌘ key and click the name of the AppleScript you created. In the window that opens double-click the script name and set a keyboard shortcut.

    If you don’t want to use FastScripts you can use Automator to create a Quick Action workflow with a Run AppleScript action. Once created, set a keyboard shortcut by navigating to  > System Preferences > Keyboard > Shortcuts > Services. Note that when creating the Quick Action in Automator the "Workflow receives no input in any application". Also note that before using the keyboard shortcut you’ll need to access the Quick Action from QuickTime’s Services menu first. Otherwise the script likely won’t run and you’ll just hear a system beep.

    You’ll need to give permission to allow any app to control your computer by navigating to  > System Preferences > Privacy > Accessibility and adding it to the list. This would include Script Editor, Automator and FastScripts.

    For each time differentiated forward or backward jump you’ll need a separate AppleScript and corresponding keyboard shortcut. Remember to change the jump variable ("set jump to 30") and operator (plus(+) or minus(-)) as required in each script. For the keyboard shortcuts set up a consistent system that is easy to remember such as using different modifier keys with a number for forward and backward. For instance, Shift(⇧) + Control(⌃) + a number for backward and Option(⌥) + Command(⌘) + a number for forward. Thus ⇧ + ⌃ + 3, ⇧ + ⌃ + 6 and ⇧ + ⌃ + 9 would be the keyboard shortcuts to jump back 30, 60 and 90 seconds respectively. ⌥ + ⌘ + 3, ⌥ + ⌘ + 6 and ⌥ + ⌘ + 9 would be the keyboard shortcuts to jump ahead 30, 60 and 90 seconds.

    The AppleScript (set to jump forward 30 seconds):

    tell application "QuickTime Player"
    	activate
    	try
    		tell document 1
    			# number of seconds to jump
    			set jump to 30
    			# "+" to jump forward, "-" to jump back
    			set jumpTime to current time + jump
    			if jumpTime > duration then
    				set current time to duration
    			else if jumpTime < 0 then
    				set current time to 0
    			else
    				set current time to jumpTime
    			end if
    		end tell
    	on error
    		return
    	end try
    end tell
    

    Tested with macOS Mojave 10.14.3, Script Editor 2.11, AppleScript 2.7, Automator 2.9 and FastScripts 2.7.6