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 a transient map for frequent commands #84

Merged
merged 2 commits into from
Dec 13, 2023

Conversation

magne-hov
Copy link
Contributor

Hi, thanks for this nice package.

I like to invoke smudge-command-map with a prefix key, but that means that I need quite a few key presses if I want to skip multiple tracks or change the volume by multiple increments.

I find that a transient keymap solves this pretty well for me. It lets me define frequent commands that I can repeat without needing to repeat the prefix. While the transient map is active any other key will work as normal and deactivate the transient map. This is the same way that test-scale-adjust lets you repeat itself without repeating the C-x prefix.

I've added a defcustom so that this feature can be enabled optionally:

(use-package smudge
  :custom
  (smudge-player-use-transient-map t)
  :bind-keymap
  ("C-c M-s" . smudge-command-map))

I thought I'd share this here in case other were interested in having similar functionality.

@danielfm
Copy link
Owner

I was wondering about something like this just the other day. Thanks for sharing!

@danielfm danielfm self-assigned this Dec 11, 2023
@danielfm
Copy link
Owner

Works nicely, thanks for the contribution. 😄

@danielfm danielfm merged commit 9aa2edd into danielfm:master Dec 13, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants