[GH-ISSUE #428] Remap key to key combination #1169

Closed
opened 2026-03-14 13:47:23 +03:00 by kerem · 5 comments
Owner

Originally created by @repparw on GitHub (Apr 23, 2024).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/428

I'm thinking how to bind y to the equivalent of 'a 5'. So, current song, copy link.
I think either having it so you can bind to a sequence of commands, or bind a key to a sequence of keys would be nice.
Something like
keymaps
command = "ShowActionsOnCurrentTrack; CopyTrackLink"
key_sequence = "y"
or
keymaps
command = "a 5" // maybe a different name instead of command? idk
key_sequence = "y"

Originally created by @repparw on GitHub (Apr 23, 2024). Original GitHub issue: https://github.com/aome510/spotify-player/issues/428 I'm thinking how to bind y to the equivalent of 'a 5'. So, current song, copy link. I think either having it so you can bind to a sequence of commands, or bind a key to a sequence of keys would be nice. Something like [[keymaps]] command = "ShowActionsOnCurrentTrack; CopyTrackLink" key_sequence = "y" or [[keymaps]] command = "a 5" // maybe a different name instead of command? idk key_sequence = "y"
kerem 2026-03-14 13:47:23 +03:00
Author
Owner

@aome510 commented on GitHub (Apr 24, 2024):

It's better to define a separate mapping for actions, for example

[[actions]]
action = "GoToTrackRadio"
key = "r"

[[actions]]
action = "AddToLikedTracks"
key = "y"
<!-- gh-comment-id:2073861881 --> @aome510 commented on GitHub (Apr 24, 2024): It's better to define a separate mapping for actions, for example ```toml [[actions]] action = "GoToTrackRadio" key = "r" [[actions]] action = "AddToLikedTracks" key = "y" ```
Author
Owner

@repparw commented on GitHub (Jul 29, 2024):

I just started to take a look at the actions! Nice one.
Unfortunately it seems it still doesnt allow to implement the example I gave? I can only for example copy the link of the current selection. I can't do the equivalent of 'a 5' right now.
I'd need to go to currently playing context and select the song I'm playing for example and then use the CopyLink action.
Unless I'm getting something wrong?

<!-- gh-comment-id:2257016395 --> @repparw commented on GitHub (Jul 29, 2024): I just started to take a look at the actions! Nice one. Unfortunately it seems it still doesnt allow to implement the example I gave? I can only for example copy the link of the current selection. I can't do the equivalent of 'a 5' right now. I'd need to go to currently playing context and select the song I'm playing for example and then use the CopyLink action. Unless I'm getting something wrong?
Author
Owner

@aome510 commented on GitHub (Jul 29, 2024):

Unfortunately it seems it still doesnt allow to implement the example I gave? I can only for example copy the link of the current selection. I can't do the equivalent of 'a 5' right now.
I'd need to go to currently playing context and select the song I'm playing for example and then use the CopyLink action.
Unless I'm getting something wrong?

Yeah, you're right. The current action only works on currently selected item. We can update action keymap to also support currently playing track, which can be configured by a new field ActionType

enum ActionType {
   PlayingTrack
   SelectedItem
}

cc @juliamertz is this something you're interested in working on as a follow-up?

<!-- gh-comment-id:2257066162 --> @aome510 commented on GitHub (Jul 29, 2024): > Unfortunately it seems it still doesnt allow to implement the example I gave? I can only for example copy the link of the current selection. I can't do the equivalent of 'a 5' right now. I'd need to go to currently playing context and select the song I'm playing for example and then use the CopyLink action. Unless I'm getting something wrong? Yeah, you're right. The current action only works on **currently selected item**. We can update `action` keymap to also support currently playing track, which can be configured by a new field `ActionType` ```rust enum ActionType { PlayingTrack SelectedItem } ``` cc @juliamertz is this something you're interested in working on as a follow-up?
Author
Owner

@juliamertz commented on GitHub (Aug 4, 2024):

cc @juliamertz is this something you're interested in working on as a follow-up?

Doesn't look like this would be too much work, i'll take a look at it when i get some time

<!-- gh-comment-id:2267536145 --> @juliamertz commented on GitHub (Aug 4, 2024): > cc @juliamertz is this something you're interested in working on as a follow-up? Doesn't look like this would be too much work, i'll take a look at it when i get some time
Author
Owner

@aome510 commented on GitHub (Aug 4, 2024):

cc @juliamertz is this something you're interested in working on as a follow-up?

Doesn't look like this would be too much work, i'll take a look at it when i get some time

Great, thank you!

<!-- gh-comment-id:2267591380 --> @aome510 commented on GitHub (Aug 4, 2024): > > cc @juliamertz is this something you're interested in working on as a follow-up? > > Doesn't look like this would be too much work, i'll take a look at it when i get some time Great, thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#1169
No description provided.