Shortcut for hold down the trackpad permanently

Hello,
to increase the playback speed in the Safari.app on YouTube, you have to hold down the trackpad permanently.
Is there any way to simulate this with a keyboard shortcut and switch it on and off?
Thank you.

Is it to simple, or to tricky? :laughing:

I think I might not fully understand (not a very active youtube user :-)), how do I change the playback speed by holding down the trackpad?

Maybe something like this? (Using the predefined action "Custom Mouse Buttons & Modifiers"?
This example would hold the left mouse for two seconds:

Alternatively there is a Safari extension called "Accelerate" that allows to use keyboard shortcuts for this.

YouTube also already supports keyboard shortcuts for playback speed: Shift + < and Shift + > to reduce and increase playback speed respectively.

The only problem with this method v/s keeping the trackpad clicked held down is that it doesn't toggle between 1x and 2x but rather goes up by a step of .25x i.e 1x -> 1.25x -> 1.5x -> 1.75x -> 2x. And same way when doing down. You can probably use BTT's Cycle though multiple actions action to trigger the shortcut 3 times to get the same effect as holding the trackpad down and reverse it when pressing the same shortcut again.

2 Likes

@rishifter thanks for this hint.

But how can I press Shift + < ? To get < I have to press Shift. :laughing:
Shift + > works fine.

you probably have a keyboard layout where this particular shortcut is not possible- probably youtube uses a different shortcut in that case

@Andreas_Hegenberg thanks for your help.
I'm using a MacBook Air M1, where the < and the > is on the same button.

According to Google/YouTube the shortcut is Shift + , and Shift + . but this does not work either.

Actually I added an extra shift there (using American layout keyboard here). This page lists '>' and '<' as the shortcuts (which requires holding down shift).

The shortcuts shown in your screenshots seem to be the same. Are you able to trigger them normally on the keyboard? Do also be mindful that YouTube needs to be in focus for the shortcuts to work.

@rishifter that's part of my problem, I can't even execute the official shortcut on my MacBook Air keyboard (German layout).
Hence my idea to solve this using BTT.

Ah I see!

It seems to be a common problem with youtube on german (and various other) keyboard layouts. There doesn't seem to be a easy workaround.

Options you have:

1.) Install one of the extensions that let you control the playback state
2.) Enable developer mode in Safari, and make it "Allow JavaScript from Apple Events"


Then you can call this Apple Script from BTT to increase playback speed

tell application "Safari"
	tell front document
		do JavaScript "document.querySelector('video').playbackRate += 0.5;"
	end tell	
end tell

And this do decrease playback speed:

tell application "Safari"
	tell front document
		do JavaScript "document.querySelector('video').playbackRate -= 0.5;"
	end tell
	
end tell

3.) (I haven't tested this one): Add a US Keyboard layout to your system, then setup a BTT action sequence that temporarily activates the US layout, sends the shortcut and then switches back to german layout.

Personally I'd prefer option 2.