Mousekey speeds


(Gareth Hayes) #1

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.


(Gergely Nagy) #2

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


(Michael Richters) #3

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.


(Gareth Hayes) #4

Do you think you can find the code?

I’ll start looking at how to write macros.


(Gergely Nagy) #5
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.


(Matt) #6

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.


(Shriramana Sharma) #7

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;

(ArleyM) #8

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.


(Gergely Nagy) #9

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.