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

Support scrolling up / down actions in button mappings #244

Closed
lujjjh opened this issue Aug 24, 2022 · 7 comments
Closed

Support scrolling up / down actions in button mappings #244

lujjjh opened this issue Aug 24, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@lujjjh
Copy link
Collaborator

lujjjh commented Aug 24, 2022

Please add support for remapping side buttons to other functions. I used steermouse before to map button 4 and button 5 to scrolling up and down in browsers and other programs. I believe you could set how many lines it scrolled too in steermouse so they functionality in here would be amazing

Originally posted by @skareel in #12 (comment)

Current supported actions:

https://github.com/linearmouse/linearmouse/blob/main/Documentation/Configuration.md#action-sheet

@lujjjh lujjjh added the enhancement New feature or request label Aug 24, 2022
@skareel
Copy link

skareel commented Aug 24, 2022

@lujjjh I checked out the github link you attached but not sure how I would use this to map the scroll up and scroll down to the side buttons. Will there be a GUI interface to do this? I use xmouse on windows too and it works great for this kind of thing. You go to mouse button 4 and 5 on the interface, click the dropdown, and then you can select scroll up and scroll down and then how fast they should be.

@lordzsolt
Copy link

Hey @skareel, I would also be very interested in this functionality.

I have a weird situation, where it's significantly easier to press the Forward button on my mouse, but I use the Back button 100x more often. As such, I flipped the Back and Forward buttons (lazy engineers... 😅).

I was hoping to do be able to do this from LinearMouse, and not have to install Logitech software for it, because it used to mess with Pointer Speed / Mouse Acceleration; It would always be finicky back when I used SteelSeries Exact Mouse, before I found LinearMouse.

I would be glad to try and tackle it in a PR, if you accept contributions.
(Of course with a more general solution)

@lujjjh
Copy link
Collaborator Author

lujjjh commented Nov 17, 2022

Of course, PRs are welcome :)

But I'd like to discuss more about the design before I (or we) start coding.

The current design of button mapping is not complete enough. I'm considering what design would meet the requirements while staying relatively simple to configure.


I've thought about the cases below:

1. Perform an action when a button is up

This is the most basic case and has been implemented.

2. Perform an action when a button is down with key repeat support

Scrolling up / down when button is pressed is slightly different. If we simply scroll up / down a bit when the button is up, it would be clunky to use.

By introducing a new property,

{
  "repeat": true
}

we can trigger the scroll action when the button is down. And if we hold the button, the scroll action should be repeated unless the key repeat is disabled in the System Settings.

3. Map button A to button B (or flip two buttons)

Slightly different. When button A is down / up, trigger a button B down / up event respectively.

But should we support modifier keys mapping? For example, map cmd + button A to option + button B.

4. Perform an action when scrolling up / down

Issue #227.

5. Complex rules

For example, perform an action when long press a button or scrolling when holding a button.


4 and 5 are a bit more complicated. We may discuss on and implement the 2nd and 3rd cases first.

@lujjjh
Copy link
Collaborator Author

lujjjh commented Nov 17, 2022

Will there be a GUI interface to do this?

This is unlikely to happen before I refactor the UI. It seems that SwiftUI is not a good choice before macOS 11 due to the lack of functionality and full of bugs. But I don't want to stop Catalina support since I believe there are still users that are using Catalina (#38). I'm considering to migrate the UI to WebView. Since then, there should be a GUI for button mapping configuration.

@skareel
Copy link

skareel commented Nov 18, 2022

Of course, PRs are welcome :)

But I'd like to discuss more about the design before I (or we) start coding.

I like the way x-mouse works on windows for this. I can map the different buttons on the mouse to whatever function I want and then control the parameters from there. For instance, on windows, I'll set the thumb forward and back buttons to "Scroll Up" and "Scroll Down". I use this to scroll up and down in web browsers and to zoom into applications I work in. I like it better than using the scroll wheel on the mouse.

I don't know how they implemented the scroll up/down functionality, but it doesn't have a delay when it repeats and its not mapped to like the up arrow or something to scroll up. It's separate from that and works really well. I can also choose how fast it scrolls too.

@skareel
Copy link

skareel commented Nov 18, 2022

And currently there is no way to do this on mac without downloading something like steermouse, but steermouse messes with my mouse sensitivity and acceleration so I won't use it. I use linearmouse because it works great for removing acceleration but having the button mappings like x-mouse would be the game changer.

I prefer to control the sensitivity through logitech ghub (i have an mx518) and then turn off acceleration with linearmouse and hopefully be able to remap the buttons with linearmouse as well. GHUB does not work well at all for mapping the thumb buttons to scroll up/down.

@lujjjh
Copy link
Collaborator Author

lujjjh commented Jan 25, 2023

@skareel The scrolling action is now available through the configuration file. The GUI implementation will be tracked in #320.

@lordzsolt Swapping buttons has been implemented in #319 and will be released in the next beta version.

So I'm closing this issue. Please feel free to reopen it if you have any further questions.

@lujjjh lujjjh closed this as completed Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants