igrigorik / videospeed

HTML5 video speed controller (for Google Chrome)
https://chrome.google.com/webstore/detail/video-speed-controller/nffaoalbilbmmfgbnbgppjihopabppdk
MIT License
3.84k stars 548 forks source link

Allow modifier keys #1126

Open Layarion opened 4 months ago

Layarion commented 4 months ago

it'd be nice if i could have a second layer of keys.

like if i could set "z" to rewind 3 seconds, and "shift z" to rewind 5 seconds.

wawadanon commented 3 months ago

yes!!

hounvs commented 2 weeks ago

It sounds like this is partially intentional per the README:

Unfortunately, some sites may assign other functionality to one of the shortcut keys - this is inevitable. As a workaround, the extension listens both for lower and upper case values (i.e. you can use Shift-) if there is other functionality assigned to the lowercase key. This is not a perfect solution since some sites may listen to both, but it works most of the time.

This section previously named Vimeo as an example where the default "S" from this extension overlapped with Vimeo's share feature: https://github.com/igrigorik/videospeed/commit/7079bbf718f4546d68258d4753cd513eb296db58

However, this pre-dated custom controls (and possibly the experimental "disable website key bindings") so it seems like it could work, even if lumped under experimental too. They're already checking for and ignoring keypresses with other modifier keys so it would just need to account for Shift explicitly.