MarshallOfSound / Google-Play-Music-Desktop-Player-UNOFFICIAL-

A beautiful cross platform Desktop Player for Google Play Music
https://www.googleplaymusicdesktopplayer.com
MIT License
8.27k stars 766 forks source link

Feature request: Set Media key on keyboard to launch the Google Play Music Desktop Player #2670

Open mpowrie opened 7 years ago

mpowrie commented 7 years ago

Firstly - I love your work! This is a small enhancement request:

OS: Windows 7, Windows 10

Issue Description: When pressing the Media player key on a Windows keyboard that has dedicated media keys, by default Windows Media Player is launched (or whichever player set to launch .cda (CD Audio) - something Google Play Music Desktop Player cannot do).

Feature Proposal: At install time (and in settings), you could have an option to associate Google Play Music Desktop Media player with the keyboard media player key. If the user selects this option:

You create a reg key and reg key value: key: HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\16 Value name: ShellExecute Value type: String Value Value string: (the startup command for Google Play Music Desktop Player) (This key also works in HKLM if you want to set for all users...)

That's it! Thanks!!

jostrander commented 7 years ago

Currently, as far as I'm aware, this app is entirely user space, which means it doesn't require administrator privileges to install on windows, or to operate. With that being said, writing to the registry requires administrator privileges and I think that's something @MarshallOfSound was trying to avoid having to do at all costs. I'll let him weigh in on this.

mpowrie commented 7 years ago

Thanks @jostrander for the response. Writing to the HKEY_CURRENT_USER hive (abbreviated to HKCU) doesn't require elevated privileges, so it should be good.

MarshallOfSound commented 7 years ago

I would accept a PR to add an option to set the HKCU value. It would have to uninstall safely though. I.e. When GPMDP is uninstalled we need to either delete the key or revert it back to it's original value.

jostrander commented 7 years ago

Huh, I wasn't aware, but that totally makes sense. Thanks for that insight @mpowrie.

theFisher86 commented 7 years ago

It may make more sense to add whatever flag is necessary for GPMDP to be considered an option for "Default Music App" instead. Windows 10 will launch whatever the default music app is when the media button is pressed. This would be a cleaner approach and allows the user to handle it however they want. Granted, this would be even more useful if the ability to play local mp3s was added into the app. Then GPMDP could be a one stop shop.