0

I want to be able to change the value of a number up an down based on the movement of the mouse wheel. I have an image with a certain part having a different brightness and i want to adjust the brightness with the mouse wheel until i think they are the same. I thought there was a function called windowscrollwheelfcn but that doesn't seem to exist on matlab 2017. I am also using the pyschtoolbox.

Unfortunately I am new to this and do not know where to begin.

[winID,winRect] = Screen('OpenWindow', 0, 128);
HideCursor;
im = round( 128*( 1 + argyle2 ) );
im(isnan(im)) = 150;
Screen('PutImage',winID,im,winRect);
Screen('Flip',winID);
  • 2
    [WindowScrollWheelFcn](https://www.mathworks.com/help/matlab/ref/matlab.ui.figure-properties.html?#property_d119e287293) is a `figure` window callback. – sco1 Nov 22 '17 at 19:06
  • Out of curiosity, what does `get(winID)` show? – gnovice Nov 23 '17 at 05:08

1 Answers1

0

If you're using Mac or Linux, you can use the Psychtoolbox function GetMouseWheel (it appears it isn't supported on Windows): http://docs.psychtoolbox.org/GetMouseWheel

If you're using Windows, you could use a key remapping program to map the mouse wheel up / down to other buttons, for example a keyboard button or a mouse button that is not otherwise present on the mouse (such as http://www.highrez.co.uk/downloads/XMouseButtonControl.htm ).

DMR
  • 1,479
  • 1
  • 8
  • 11