-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing keyboard shortcuts #2698
Conversation
Yes please, we now have O and P for that but it would be nice if
Im not sure if it would really matter because you are pressing SHIFT first. I would like it to behave the same as YT for the same reasons pointed out before.
That would indeed be nice! |
Shift + N can now play next recommend video if not in playlist
I've now added the other shortcuts
Shift + P can no longer be used to increase video playback rate |
|
you could control video playback rate with lowercase and uppercase p |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested most except
Home and end shortcuts (MacOS)
according to this article you can use Fn+Left arrow for Home and Fn+Right arrow for End |
Still can't get it to work ._. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
…into add-missing-shortcuts
Forgot about this somehow. Prevents a error from appearing in console when using shortcut while not watching a playlist. I did notice a seperate error appears if on first video.
Head branch was pushed to by a user without write access
Requires you to press Shift when Caps Lock is enabled. Co-authored-by: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>
Head branch was pushed to by a user without write access
Ready for review? |
bug needs fix first. |
@Aiz0 You can fix that by not returning at the top when shift is pressed, you only need to check that shift is pressed for specific shortcuts, for others it's fine if shift is pressed or not. |
- Alphanumeric keys don't work when shift is held, they still work when capslock is enabled - By using toLowerCase(), Only one case per key is required instead of one for upper and one for lowecase. - The check for shift does not simply return anymore. additional switch statements can be added for shifted keys. Having a seperate switch statement is in my opinion better than having checking for shift on each shortcut. - Keys that require shift to be typed put into seperate switch statement. lmaooooooooooooooooooooooooooooooooooooooooooooooooooooooo :[ :(
simplefies things and shouldn't cause any issues as far as i'm aware
Head branch was pushed to by a user without write access
second switch statement now only includes keys with names longer than a single character
Head branch was pushed to by a user without write access
if (event.ctrlKey || document.activeElement.classList.contains('ft-input') || !event.shiftKey) { | ||
return | ||
} | ||
switch (event.key.toUpperCase()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we use switch (event.key.toLowerCase()) {
above but toUpperCase
here ?_?
No an issue for me though, just curious
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Did you mean to close this PR? @Aiz0 |
Add missing keyboard shortcuts
Pull Request Type
Related issue
#2138
Description
According to #2138 there seems to be 2 missing shortcuts, 2 shortcuts that are already implemented but users want alternate bindings, and 2 shortcuts don't have any regular key binds, uses Media keys exclusively.
What's implemented
Shift + P can no longer be used to increase video playback rate
Alternate shortcuts
video playback rate
Should < and > be added as alternate keybinds to speed up / slow down video playback rate?Implemented
playlist navigation
Youtube supports Shift + N and Shift + P to navigate to next / previous video in playlist.Freetube already uses P to slow down playback rate.
Should we use some other keys for this?
Implemented
I could also try to add support for the media next playing next suggested video if not playing any playlist.Implemented
Screenshots
no visible changes.
Testing
Home and end shortcuts
Playback rate shortcuts
Playlist shortcuts
you should also test if autoplay next works as expected.
Next Recommended videos shortcuts
Go to any video with
hide recommended videos
disabledyou should also test if autoplay next works as expected
Nothing should happen if
Hide recommended videos
is enabled.Desktop
Additional context
https://support.google.com/youtube/answer/7631406