Mousekey speeds

Does anyone else find the mousekey speeds really annoying?

I’ve been playing around and have come to the conclusion that acceleration is off the table, no matter what I set it to it’s unusable for me. So I’m stuck with a fixed speed. But then there’s no good fixed speed. It’s either too slow to be usable, or the pixel jump size is too large to be usable.

What would be cool is if you could modify the speed with another key, so that you can nudge it around to click things, but also make it go faster when you want to move around the screen.

Before I mess around trying to make this happen, I wanted to see if anyone else has any ideas.

3 Likes

You can definitely make a macro that will adjust the mouse speed - I used to have that too.

2 Likes

I like this idea a lot. Maybe three keys for slow, medium, and fast. Or ones that act like modifier keys. Or maybe two keys — one that speeds things up, one that slows it down…

Between this and the new MouseKeys “sudoku” PR for warping, I’m thinking a lot about how I’d like mouse control to work.

1 Like

Do you think you can find the code?

I’ll start looking at how to write macros.

switch (macroIndex) {
case M_MOUSE_SLOW:
  if (keyToggledOn(keyState)) {
    MouseKeys.speedDelay = 5;
  }
  break;
case M_MOUSE_FAST:
  if (keyToggledOn(keyState)) {
   MouseKeys.speedDelay = 0;
   MouseKeys.speed= 2;
  }
  break;
case M_MOUSE_NORMAL:
  if (keyToggledOn(keyState)) {
   MouseKeys.speedDelay = 0;
   MouseKeys.speed = 1;
  }
  break;
}

Something along these lines. See the readme of MouseKeys for more properties one can set. It takes a bit of experimentation to figure out the right settings, as there’s no one setting that would fit all.

2 Likes

I agree the the acceleration is pretty much useless right now. Even setting it to the lowest, after half a second it moves to fast to even see the cursor move.

Since you already have to hold Function to enable MouseKeys. I was thinking of doing it based on the function keys.

Something like Left Function would be Medium speed. Right function would be Slow speed. And both function keys at the same time for Fast speed.

I haven’t had a chance to look into how to implement that yet, but I don’t think it would be too complex.

2 Likes

For a much simpler requirement one can just define a single macro:

    case M_MOUSE_SPEED_CHANGE:
        if (keyToggledOn(keyState))
            MouseKeys.speed = (MouseKeys.speed == MOUSE_SPEED_FAST) ? MOUSE_SPEED_SLOW : MOUSE_SPEED_FAST;
        break;

hits like so he can steal someone’s hard work soon

+1 to even lowest acceleration being too much. It would be nice to have more granular control.

You can adjust MouseKeys.speedDelay (delay in ms between cursor movement; default 0ms) and/or MouseKeys.accelDelay (delay in ms between acceleration steps; default 50ms) for a bit more granularity. They’re not the friendliest bunch, and perhaps not the easiest to model in one’s head either, but you can make acceleration slower than MouseKeys.accelSpeed = 1, and you can even disable acceleration (.accelSpeed = 0), and slow down cursor movement (.speedDelay = 20 for example).

It does take a bit of trial and error to find the right spot, though.