Slider (using builder)

Hi!
I’m using the most updated version of Psychopy (v.2022.1.1). I’ve put a slider in my experiment using builder and I cannot get the slider itself to move - not with the mouse, keys, etc. I’d like to have it move using certain keys but I can’t figure out how to get it to move at all.

The ultimate goal is for it to move with the key press “a” — I’m doing an fMRI experiment and that’s the input we’ll get from the scanner button box. I would be so grateful for any help!

Strange that it won’t respond to any input, what operating system are you on?

To use the ‘a’ key to move the slider (in this example, adding +1 each frame the key is pressed) you would add a :keyboard: Keyboard component (let’s call it keys) to listen for key presses, then a :code: Code component with the following in its Each Frame tab:

if keys.getKeys(['a']):
    if slider.response is None:
        # If this is the first response, start at 1
        slider.response = 1
    else:
        # Otherwise, add 1
        slider.response += 1

Thanks for this feedback — I’m using a Mac OS (Catalina), not sure why it’s not moving at all!