# isShiftDown on a slider \[solved\]

**URL:** <https://forum.juce.com/t/isshiftdown-on-a-slider-solved/24404>\
**Category:** General JUCE discussion\
**Created:** [September 27, 2017, 6:37pm UTC](https://forum.juce.com/t/isshiftdown-on-a-slider-solved/24404 "2017-09-27T18:37:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaveH](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daveh/32/4924_2.png) [@DaveH](https://forum.juce.com/u/DaveH)\
**Post date:** [September 27, 2017, 6:37pm UTC](https://forum.juce.com/t/isshiftdown-on-a-slider-solved/24404/1 "2017-09-27T18:37:25Z")

</div>

Hi, like the title says I’m looking at making a slider snap to certain values when the user is hold a modifier down. I believe I use isShiftDown() but it’s not in the slider component. Any idea how I do that?  
I already know how to snap a value, that’s not the problem. 🙂

Thanks,  
Dave.

---

<div class="post-metadata">

**Author:** ![DaveH](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daveh/32/4924_2.png) [@DaveH](https://forum.juce.com/u/DaveH)\
**Post date:** [September 27, 2017, 7:01pm UTC](https://forum.juce.com/t/isshiftdown-on-a-slider-solved/24404/2 "2017-09-27T19:01:31Z")

</div>

Never mind, I have to overide the modifierKeysChanged function and then use:  
void modifierKeysChanged(const ModifierKeys& modifiers) override  
{  
shiftDown = modifiers.isShiftDown();  
}
