Repository navigation
|
I am trying to remap mouse movement to Keypad Up/Down/Left/Right. The problem is, the reaction to mouse movement is too sensitive, even if I move the mouse even slightly, it is registered as a key press. Can I set a threshold somehow, so that it is registered as a keypress only if I have moved my mouse no less than X? I have tried twiddling with Release input, Release timeout, Trigger threshold, but none seems to be helping. |
Replies: 1 comment 1 reply
|
Trigger threshold is the right control, but its unit is not the one you are reasoning in, which is why turning it up did not behave the way you expected.
Release input and Release timeout could not have helped either, since they sit on the other side of the same handler. There is no distance-accumulating option in the mapping, so the practical lever is the device rather than the config: drop the mouse's DPI, which means fewer counts reported for the same physical movement, then raise the threshold until slow movement stops registering. That combination gets you closest to "only when I have actually moved it", though it will still let a fast twitch through, because per-report speed is fundamentally what is being measured. |
Trigger threshold is the right control, but its unit is not the one you are reasoning in, which is why turning it up did not behave the way you expected.
RelToBtnHandler.notifycomparesevent.value— the delta carried by a single EV_REL report — against the threshold, and nothing accumulates between reports. So the test is "did this one report carry at least X counts", not "has the pointer travelled X since I started moving". In practice that makes it a gate on mouse speed rather than on distance: a small quick flick produces a large delta and trips it immediately, while a slow drag across the whole desk produces a stream of small deltas and never trips it at all. Your slight movements ar…