4

I am running an experiment involving a joystick (cannot use a mouse for technical reasons), using psychtoolbox version 3, on a linux computer. At discrete time-points in the experiment, I need to place the joystick cursor at pre-determined points on the screen, so that the participant can move the cursor from there. However, psychtoolbox does not seem to have a command to do this. I can get this to work using a mouse, but not with a joystick. I tried the SetMouse command, but it does not seem to work for the joystick cursor. Does someone have any idea?

Bharath
  • 41
  • 1
  • 1
    How are you displaying the joystick / gamepad position to the participant, via manually drawing an indicator to the screen? I believe that the GetMouse functions return the X,Y position of the mouse indicator on the screen, however the Gamepad functions instead return the position of the Gamepad joystick and any buttons at that particular point in time. Does moving the Gamepad / joystick on your system move the system mouse indicator? – DMR Oct 06 '20 at 15:52
  • @DMR: 1. Yes, I manually draw an indicator on the screen at the position obtained from the Gamepad function. 2. Moving the joystick does not move the system mouse indicator- but this is what I want to do during the course of the experiment. Naturally, after the experiment, the control of the system mouse indicator should go back to the mouse from joystick. Does that help? – Bharath Oct 06 '20 at 16:30
  • I might be misunderstanding you, but if you are drawing the indicator, couldn't you manually position the indicator that way? I assume that when you read the gamepad, you receive the position of the joystick axes, and you have to use their position to update the position of the screen indicator? – DMR Oct 06 '20 at 19:36
  • @DMR: Yes, I can. But the problem with that is since the manually drawn indicator and the joystick cursor are not identical, once the joystick cursor (given by the position of the joystick axes) reaches a bound, it cannot move any further making the indicator appear as if it is "stuck". Unfortunately, I can only reset the joystick cursor position at the start of the experiment, and not in the middle. – Bharath Oct 07 '20 at 10:15

0 Answers0