feat: add subtitle toggle hotkey#961
Open
schembriaiden wants to merge 6 commits intoDonutWare:developfrom
Open
feat: add subtitle toggle hotkey#961schembriaiden wants to merge 6 commits intoDonutWare:developfrom
schembriaiden wants to merge 6 commits intoDonutWare:developfrom
Conversation
PartyDonut
reviewed
Apr 18, 2026
PartyDonut
requested changes
Apr 28, 2026
Collaborator
PartyDonut
left a comment
There was a problem hiding this comment.
It seems to not work entirely like expected.
When I have a subtitle selected it still opens the subselection.
After then selecting that subtitle it toggles on/off fine.
When off is the initial selection and I press the toggle it shows subselection. After selecting something toggling works like expected.
But after then selecting a different subtitle toggling still toggles between the initial selection and off. Not the new selection and off.
Contributor
Author
|
All the cases you mentioned should be fixed now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
This pull request introduces a new "toggle subtitles" hotkey feature to the video player, allowing users to quickly enable or disable subtitles using a keyboard shortcut. The implementation includes localization, hotkey mapping, and logic for toggling subtitles, including handling multiple subtitle tracks and remembering the user's last selection.
New Subtitle Toggle Feature:
toggleSubtitleshotkey to theVideoHotKeysenum, mapped by default to the "T" key (LogicalKeyboardKey.keyT)._toggleSubtitlesmethod in_DesktopControlsStateto handle toggling subtitles on/off, supporting both single and multiple subtitle tracks and remembering the last selected subtitle.Localization:
toggleSubtitlesstring to the English localization file (app_en.arb) for display in the UI and settings.VideoHotKeyslabel mapping to include the newtoggleSubtitleskey for proper display in settings menus.Codebase Maintenance:
media_streams_model.dartto support subtitle toggling logic._lastSelectedSubtitleIndexstate variable to remember the user's last subtitle choice across toggles.Logic is as follow:
Press toggle:
Issue Being Fixed
Resolves #957
Screenshots / Recordings
Tested On
Checklist