# Slider fine adjustment via shift

**URL:** <https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811>\
**Category:** General JUCE discussion\
**Created:** [January 4, 2018, 12:36pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811 "2018-01-04T12:36:15Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [January 4, 2018, 12:36pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811/1 "2018-01-04T12:36:15Z")

</div>

I think its pretty standard (in Cubase and Logic Pro) to use the shift-key for fine slider adjustments, could this be added (or an option) ?

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [January 4, 2018, 12:39pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811/2 "2018-01-04T12:39:39Z")

</div>

iirc, it’s already there. should be on by default.

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [January 4, 2018, 12:46pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811/3 "2018-01-04T12:46:03Z")

</div>

I don’t think so, how?

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [January 4, 2018, 12:52pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811/4 "2018-01-04T12:52:33Z")

</div>

Just checked - it’s actually cmd/ctrl that engages fine mode.

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [January 4, 2018, 12:58pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811/5 "2018-01-04T12:58:05Z")

</div>

yes, i need shift, which is almost standard 😉

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [January 4, 2018, 12:59pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811/6 "2018-01-04T12:59:53Z")

</div>

you’ll have to add your own processing for the shift button - just check out how cmd/ctrl works

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [January 4, 2018, 1:21pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811/7 "2018-01-04T13:21:15Z")

</div>

funny thread, yes of course i could do that, but I already studied the slider-source code before creating this topic, than i came to the conclusion, that there is not a elegant, non-hacky, or without need to re-implementation already existing functionality approach, to create this behaviour which is almost standard in all major DAWs.  
A simple override-able callback in the Slider-class bool isModifierKeyFineMode(…) would do the job.

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [January 4, 2018, 1:23pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811/8 "2018-01-04T13:23:19Z")

</div>

I obviously wasn’t aware that you’re already done that, for all I knew you weren’t aware that any of that functionality has been implemented in some form. If you had mentioned any of that in the OP I would have known to keep my attempt at being helpful to myself 😃

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [January 4, 2018, 2:37pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811/9 "2018-01-04T14:37:45Z")

</div>

I appreciate that you wanted to be helpful. Please back to topic! @jules?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [January 4, 2018, 2:43pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811/10 "2018-01-04T14:43:39Z")

</div>

I’ve no objection to extending Slider a bit to allow the modifier to be specified. Bit busy here though, want to submit a change request? Probably best to just add a method that let a caller pass the set of modifiers that it should use.

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [January 4, 2018, 2:54pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811/11 "2018-01-04T14:54:47Z")

</div>

Okay! good opportunity to familiarize myself with git

---

<div class="post-metadata">

**Author:** ![matkatmusic](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@matkatmusic](https://forum.juce.com/u/matkatmusic)\
**Post date:** [January 4, 2018, 11:24pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811/12 "2018-01-04T23:24:09Z")

</div>

For what it’s worth, I’ve never seen it universally declared that ‘shift’ is the default key to engage fine adjustment mode for GUI controls. Every plugin programmer writes different stuff and they leave it to their pdf manual to say which keystrokes enable certain modes. I guess that is more a reflection of the API they used to create their plugin?

---

<div class="post-metadata">

**Author:** ![Jdik1](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@Jdik1](https://forum.juce.com/u/Jdik1)\
**Post date:** [January 8, 2018, 12:11pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811/13 "2018-01-08T12:11:38Z")

</div>

I’ve already done that some time ago. I’ve also extended the “reset to default” functionality so that you can specify a modifier key along with a single or double click to reset the slider to its default value.  
I’ve adapted the code to the latest develop commit and produced a patch that you can find attached, if you want give it a look.

[slider\_patch.txt](https://forum.juce.com/uploads/short-url/s5e6ggFjRpqmjykaYTIutOI1qgO.txt) (14.4 KB)

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [January 8, 2018, 3:14pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811/14 "2018-01-08T15:14:11Z")

</div>

Thanks, will take a look

---

<div class="post-metadata">

**Author:** ![pajczur](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@pajczur](https://forum.juce.com/u/pajczur)\
**Post date:** [September 23, 2021, 8:45pm UTC](https://forum.juce.com/t/slider-fine-adjustment-via-shift/25811/15 "2021-09-23T20:45:04Z")

</div>

Hello, thanks for that thread.  
But I think there is some misunderstanding. The subject is about “fine adjustment”. But you are talking about velocity mode which is different than fine mode.

In velocity mode precision of dragging slider depends on speed and amount of your mouse movements.

But in fine mode the slider just works slower. For example in Logic’s Pro older plugins (like Modulation-\>Chorus plugin) it works exactly like that. There isn’tn any velocity, it just works slower when “shift” is down.

Can I achieve such fine mode with `Slider`? Or do I need to write my own algorithm inside `mouseDrag()`?
