clamp slider value when using keys