Last active
May 24, 2023 17:33
-
-
Save gpaton/3fac566a84f724fe4e7c to your computer and use it in GitHub Desktop.
Karabiner (KeyRemap4MacBook) remap "Play" OSX Key to launch Spotify
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
<?xml version="1.0"?> | |
<root> | |
<!-- Spotify Path --> | |
<vkopenurldef> | |
<name>KeyCode::VK_OPEN_URL_APP_Spotify</name> | |
<url type="file">/Applications/Spotify.app</url> | |
</vkopenurldef> | |
<!-- Set Spotify definition --> | |
<appdef> | |
<appname>SPOTIFY</appname> | |
<equal>com.spotify.client</equal> | |
</appdef> | |
<!-- Use 'Music Play' key to launch Spotify if not ever in the application or ITunes --> | |
<!-- Else, act as normal play/pause button in Spotify, Itunes --> | |
<item> | |
<name>Change Play key to launch Spotify</name> | |
<identifier>private.play_launch_spotify</identifier> | |
<not>SPOTIFY, ITUNES</not> | |
<autogen> | |
__KeyToKey__, | |
ConsumerKeyCode::MUSIC_PLAY, | |
KeyCode::VK_OPEN_URL_APP_Spotify, | |
</autogen> | |
</item> | |
</root> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a way to make this only open Spotify if it's not open, and otherwise just play/pause music in Spotify?