I am trying to make it so that when a modifier key is pressed, the mouse sensitivity is decreased, but without adding a velocity curve. Simply take the input as it is, and reduce the range the movement creates.
I don’t think this is possible via setVelocityModeParameters(), but please correct me if I am wrong, and enlighten me.
This kind of works:
if (realtimeShiftStatus)
setMouseDragSensitivity(1000);
else
setMouseDragSensitivity(250);
but if shift is pressed/released during a drag, the drag calculation method still takes the start position relative to the current position and then applies this value, so releasing the modifier key causes the slider to jump to where it would have been without the modifier.
unfortunately this would not stop the slider from jumping when the sensitivity mode is changed during a drag if it’s true that it still uses dragDistanceFromMouseDown for its value calculation. That method is flawed because sensitivity can only be implemented as some sort of gain on the whole drag operation then. it’s better to use the difference between the current and last mouse.position.y as the defining thing for how the value changes. then you can change the sensitivity mode within a drag without a problem. Does juce::Slider not do that? I haven’t used it in a while, but would be kinda crazy