Skip to content
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 support for all Youtube Music shortcuts #106

Closed
PolarGoose opened this issue Dec 23, 2020 · 12 comments · Fixed by #243
Closed

Add support for all Youtube Music shortcuts #106

PolarGoose opened this issue Dec 23, 2020 · 12 comments · Fixed by #243
Labels
awaiting-reply Awaiting reply enhancement New feature or request fix-available A fix to the issue is available in a new version good first issue Good for newcomers

Comments

@PolarGoose
Copy link

PolarGoose commented Dec 23, 2020

The Shortcuts plugin doesn't support all shortcuts available in Youtube music web interface.
I have found a nice summary of all shortcuts: https://support.google.com/youtubemusic/thread/180145?hl=en
(an alternative way is to press Shift+/ on the Youtube music web site to get the list of shortcuts).

@th-ch th-ch added enhancement New feature or request good first issue Good for newcomers labels Jan 8, 2021
@th-ch
Copy link
Owner

th-ch commented Jan 15, 2021

Hey @PolarGoose, thanks for the feedback! The shortcuts plugin maps custom bindings to existing shortcuts (eg media keys or ctrl+F for search, etc) but all YTM shortcuts should be supported when the app is in the foreground - do you have an example of shortcut that does not work/did you have custom key bindings in mind?

@th-ch th-ch added the awaiting-reply Awaiting reply label Jan 15, 2021
@PolarGoose
Copy link
Author

PolarGoose commented Jan 18, 2021

@th-ch,

I thought that the shorcuts plugin allows controlling YTM while it is in a background. Isn't it the case?

@th-ch
Copy link
Owner

th-ch commented Jan 19, 2021

Hey @PolarGoose, the shortcuts plugins actually adds additional shortcuts in addition to the default YTM ones:

  • media keys (global shortcuts)
  • some new combinations, like ctrl/cmd + F to search (local shortcuts, can only be used when YTM is in the foreground)

Some shortcuts might create issues if registered globally (for example, people might not want to mute/unmute YTM each time they press M) - Do you have a particular shortcut that you would like registered globally in mind?

A possible solution could be to add custom global/local shortcuts entries in the advanced config, this way each user can customize shortcuts like they want!

@PolarGoose
Copy link
Author

PolarGoose commented Jan 20, 2021

@th-ch,

A possible solution could be to add custom global/local shortcuts entries in the advanced config, this way each user can customize shortcuts like they want!

Exactly, I want an ability to assign custom global hotkeys for every local youtube shortcut.

@th-ch
Copy link
Owner

th-ch commented Feb 7, 2021

Hey @PolarGoose, support for custom shortcuts has been added in 024ed90 and will ship in the next version! In the advanced options, you can add custom local and global shortcuts with the following format:

"shortcuts": {
    "enabled": true,
    "local": [
        {
            "shortcut": "CommandOrControl+X",
            "action": "goToSettings"
        }
    ],
    "global": [
        {
            "shortcut": "CommandOrControl+Y",
            "action": "maximizeMinimisePlayer"
        }
    ]
},

Shortcut syntax in documented in the Electron doc about accelerators and possible actions are listed in registered actions.

@th-ch th-ch added the fix-available A fix to the issue is available in a new version label Feb 7, 2021
@PolarGoose
Copy link
Author

@th-ch,
Thank you for the implementation.

@ActualBest
Copy link

@th-ch
Can I disable shortcuts this way? Would like to use the shortcuts plugin without hijacking my media controls :)
Loving this app btw, thanks so much to u and other contributers

@ActualBest
Copy link

@th-ch
Can I disable shortcuts this way? Would like to use the shortcuts plugin without hijacking my media controls :)
Loving this app btw, thanks so much to u and other contributers

Update: I found a way to disable specific included shortcuts with shortcuts plugin, will make a pr hopefully by the end of Sat

@ActualBest
Copy link

@th-ch
Can I disable shortcuts this way? Would like to use the shortcuts plugin without hijacking my media controls :)
Loving this app btw, thanks so much to u and other contributers

Update: I found a way to disable specific included shortcuts with shortcuts plugin, will make a pr hopefully by the end of Sat

Update update: it won't be needed once 964974c is merged

@Araxeus
Copy link
Collaborator

Araxeus commented Oct 19, 2021

Update update: it won't be needed once 964974c is merged

Been waiting for this merge for 6months+ 🤣

@Araxeus
Copy link
Collaborator

Araxeus commented Oct 25, 2021

PR #243 added a dedicated keybind changer in shortcuts plugin options 🙂

@Araxeus
Copy link
Collaborator

Araxeus commented Oct 26, 2021

This is the new way of creating custom keybinds in config.json

"shortcuts": {
    "enabled": true,
    "overrideMediaKeys": false,
    "global": {
        "previous": "Shift+PageDown",
        "playPause": "Shift+Enter",
        "next": "Shift+PageUp"
    }
    "local": {
        "goToSettings": "CommandOrControl+X",
        "maximizeMinimisePlayer": "CommandOrControl+Y",
    }
},

config.json folder path:

  • Windows: %AppData%/Youtube Music (MyUser/AppData/Roaming/Youtube Music)
  • Linux: ~/.config/Youtube Music
  • MacOS: ~/Library/Application\ Support/YouTube\ Music/config.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-reply Awaiting reply enhancement New feature or request fix-available A fix to the issue is available in a new version good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants