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

Direct media mappings while configuring mouse buttons #683

Closed
Netherquark opened this issue Oct 1, 2021 · 7 comments
Closed

Direct media mappings while configuring mouse buttons #683

Netherquark opened this issue Oct 1, 2021 · 7 comments

Comments

@Netherquark
Copy link

Is your feature request related to a problem? Please describe.
There isn't a direct equivalent to the media mappings feature present in G Hub. The current compromise to this is setup macros for media controls in the DE, and then make the mouse button press activate that macro. Eg. Set up Ctrl + Shift + ➡️ to play next song in Gnome, and set up Piper so that a mouse's side button press triggers Ctrl + Shift + ➡️. However, if you do happen to have a keyboard with media controls (eg my HP KM300F keyboard), you can directly map those same controls without having to go through the DE's settings and creating keyboard macros. This is what it looks like:
image

Describe the solution you'd like
It would be amazing if we could directly select the NEXTSONG and PLAYPAUSE macros while configuring button mapping. I'd reckon it won't be that hard either, considering most of the Logitech mice this software works for, also show up as keyboards for their special functions (atleast in G Hub).

Describe alternatives you've considered
The DE macro method is a less convenient way to accomplish the same, but while also losing out on one keyboard mapping.

Note: the aforementioned HP KM300F does not have any software to install, on either Windows, Linux or macOS, so the NEXTSONG and PLAYPAUSE key events are probably low level, basic commands.

@Ryhon0
Copy link

Ryhon0 commented Mar 11, 2022

Also missing volume up/down and mute keys. I was able to map music playback keys with my keyboard, but it doesn't have volume control keys

@Ryhon0
Copy link

Ryhon0 commented Mar 11, 2022

If anyone's interested, I've made a fork with a basic implementation of it, it lists media keys and when selected, the button is set to a macro with a press and release of selected key. No translations, button labels show as macros, instead of media key names, mute button doesn't have a string for macros. A proper implementation should probably have a dropdown menu with all possible keys.

Screenshots

image
image

@ShugarSkull
Copy link

@Ryhon0 Do you plan to make this a pull request ?

@Ryhon0
Copy link

Ryhon0 commented Jan 12, 2023

Nope. My implementation is kinda hacky, it'd probably be better if some contributor implemented this in the main branch.
Also I just realized I did not link to the repo, whoops!
https://github.com/Ryhon0/piper

@LarissaGuder
Copy link

Is there any chance that this feature will be implemented?

@staticssleever668
Copy link
Member

staticssleever668 commented Mar 6, 2023

For now you can do this with some mice with ratbagctl:

# Will be available in libratbag v0.18 and higher (so basically if you compile from sources right now):
ratbagctl "<device name>" button "<button index>" action set key KEY_VOLUMEUP
ratbagctl "<device name>" button "<button index>" action set key KEY_PLAYPAUSE

# Or as a macro with older libratbag versions or if the mouse doesn't support key actions:
ratbagctl "<device name>" button "<button index>" action set macro KEY_VOLUMEUP
ratbagctl "<device name>" button "<button index>" action set macro KEY_PLAYPAUSE

@staticssleever668
Copy link
Member

Seems like a duplicate of #567.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants