FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

[Feature Request]: Add missing keyboard shortcuts

Open PAI5REECHO opened this issue 3 years ago • 17 comments

Guidelines

  • [X] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem Description

Several keyboard shortcuts that work on the YouTube website video player are missing: https://support.google.com/youtube/answer/7631406

Proposed Solution

Add missing keybinds

Alternatives Considered

None

Issue Labels

ease of use improvement

Additional Information

No response

PAI5REECHO avatar Mar 19 '22 20:03 PAI5REECHO

I compiled a list of the keyboard shortcuts provided for reference, @PAI5REECHO do you have any particular shortcuts in mind that you would prioritise?

Keyboard shortcut Supported
Spacebar Yes :heavy_check_mark:
Play/Pause Media Key on keyboards Yes :heavy_check_mark: (Tested by @smcclennon)
k Yes :heavy_check_mark:
m Yes :heavy_check_mark:
Stop Media Key on keyboards Untested
Next/previous Track Media Key on keyboards Yes merged in https://github.com/FreeTubeApp/FreeTube/pull/2239 :heavy_check_mark:
Left/Right arrow on the seek bar Yes (Seeks 10 seconds instead of the 5 on Youtube) :white_check_mark:
j Yes :heavy_check_mark:
l Yes :heavy_check_mark:
. Yes :heavy_check_mark:
, Yes :heavy_check_mark:
> No (skips to next frame, should speed up playback) :x:
< No (skips to last frame, should slow down playback) :x:
Home/End on the seek bar No (scrolls page, should seek to start/end of video) :x:
Up/Down arrow on the seek bar Yes :heavy_check_mark:
Numbers 1 to 9 on the seek bar (not on the numeric pad) Yes :heavy_check_mark:
Number 0 on the seek bar (not on the numeric pad) Yes :heavy_check_mark:
/ Yes (ALT + D instead of /) merged in #2140 :heavy_check_mark:
f Yes :heavy_check_mark:
c Yes :heavy_check_mark:
Shift+N No (Should move to the next video. If you're using a playlist, will go to the next video of the playlist. If not using a playlist, it will move to the next YouTube suggested video) :x:
Shift+P No (Should move to the previous video. Note that this shortcut only works when you're using a playlist) :x:
i Yes merged in #2141 :heavy_check_mark:

vallode avatar Mar 21 '22 10:03 vallode

  • The Play/Pause media key works.
  • The Next/Previous media keys do nothing, however this is the same behaviour as on YouTube.

In my opinion an essential missing keyboard shortcut is i, which enables the miniplayer on YouTube, and could instead enable picture-in-picture on FreeTube.

smcclennon avatar Mar 21 '22 11:03 smcclennon

Seems like a good chunk of these shortcuts are covered by FreeTube just under a different key, I'll try to do some work to unify it a bit more. We should add a ? shortcut for a quick reference of all the shortcuts.

vallode avatar Mar 21 '22 12:03 vallode

A keyboard shortcut to view all shortcuts would be very helpful. Other mainstream applications such as Signal and Element use the shortcut Ctrl+/ to do this.

smcclennon avatar Mar 21 '22 13:03 smcclennon

Alternatively or in addition, keyboard shortcuts could be shown when a button is hovered over similarly to on YouTube.

For example, hovering over the theatre button on YouTube says (t) image

smcclennon avatar Mar 21 '22 13:03 smcclennon

Just for reference, every shortcut we support is listed here.

As far as why some of them were different, there were concerns with the shortcuts that YouTube uses for those with Non US / Standard layouts. Keys like / and > are mapped differently and more difficult to press on these type of layouts. The alternative that we used for the search bar, Alt + D was picked because this was the shortcut that Firefox uses for focusing their search bar and was more accessible across layouts. Though having said this I see that #1463 is open so that should be looked at.

The interval that the video skips by when using the arrow keys is determined by your interval settings, 5 seconds is the default however.

Our existing shortcuts, save for possibly the stats for nerds shortcut, shouldn't be changed and any PR to do so will likely be closed. We do welcome any PR that happens to implement the few that we missed however.

PrestonN avatar Mar 21 '22 14:03 PrestonN

What do we think of adding the shortcut keys into the popover text of buttons like @smcclennon mentioned? I think it would be a fairly easy change (happy to handle it) and it would make more people aware of keyboard shortcuts (lack of info is probably what caused this issue to be opened in the first place, as I was not aware we had all these shortcuts until delving into the codebase). Cheers.

vallode avatar Mar 21 '22 17:03 vallode

What do we think of adding the shortcut keys into the popover text of buttons like @smcclennon mentioned? I think it would be a fairly easy change (happy to handle it) and it would make more people aware of keyboard shortcuts (lack of info is probably what caused this issue to be opened in the first place, as I was not aware we had all these shortcuts until delving into the codebase). Cheers.

i would really like to see it see #1587

do you have any particular shortcuts in mind that you would prioritise?

Mostly want < & > for speed up and slow down playback

PAI5REECHO avatar Mar 23 '22 21:03 PAI5REECHO

Mostly want < & > for speed up and slow down playback

Currently these are bound to the O and P keys respectively (slow down and speed up). Waiting on overall response on having multiple shortcuts in #2140 so maybe we will bind the < > keys too :)

vallode avatar Mar 23 '22 21:03 vallode

do you have any particular shortcuts in mind that you would prioritise?

Mostly want < & > for speed up and slow down playback

This is the one I came here to file an issue about too. It is also the existing shortcut on Odysee.com, so this would bring consistency.

WillyWonksters avatar Apr 06 '22 01:04 WillyWonksters

Next Track Media Key on keyboards does work on YT but only in playlists. This doesnt work on FT yet.

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Oct 13 '22 02:10 github-actions[bot]

(These shortcuts will be added by #2698 )

Pistos avatar Oct 19 '22 00:10 Pistos

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Nov 16 '22 02:11 github-actions[bot]

Spacebar does not always toggle play/pause. It toggles whatever button was last clicked on with the mouse cursor. This is the same behavior as youtube but it's confusing and makes the spacebar useless. Please make the spacebar Always toggle play/pause.

Also, no keyboard shortcuts work at all when the video itself does not have focus.

KevinReems avatar Oct 17 '23 20:10 KevinReems