[Feature Request]: Add missing keyboard shortcuts
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
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: |
- The
Play/Pausemedia key works. - The
Next/Previousmedia 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.
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.
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.
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)

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.
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.
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
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 :)
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.
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.
(These shortcuts will be added by #2698 )
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.
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.