# GetMouse does not record activity from MacBook's Pro trackpad

**URL:** <https://psychtoolbox.discourse.group/t/getmouse-does-not-record-activity-from-macbooks-pro-trackpad/4054>\
**Category:** Bugs & Features\
**Tags:** macos\
**Created:** [October 5, 2021, 2:11pm UTC](https://psychtoolbox.discourse.group/t/getmouse-does-not-record-activity-from-macbooks-pro-trackpad/4054 "2021-10-05T14:11:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![makis6](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@makis6](https://psychtoolbox.discourse.group/u/makis6)\
**Post date:** [October 5, 2021, 2:11pm UTC](https://psychtoolbox.discourse.group/t/getmouse-does-not-record-activity-from-macbooks-pro-trackpad/4054/1 "2021-10-05T14:11:22Z")

</div>

Dear PTB community,

I am using the **GetMouse** command inside a loop in order to get the button status and update the position of a rectangle at each iteration based on the button status of the mouse.

The idea is simple: left-click should move the rectangle to the left and right-click to the right.

When I left-click the rectangle goes to the left but this is not the case when I right-click. It again goes to the left. I think this is a problem related to my macbook’s trackpad but I have also tried to connect an apple mouse and the problem persists.

Any help would be appreciated and thanks for the amazing toolbox

P.S: My code looks like this:

```
    [~,~,buttons(i,:)] = GetMouse;
    if buttons(i,1) ~= 0 && buttons(i-1,1) == 0
        cursorPosition(i) = cursorPosition(i-1)-cursorStepsize
    elseif buttons(i,3) ~= 0 && buttons(i-1,3) == 0
        cursorPosition(i) = cursorPosition(i-1)+cursorStepsize
    else
        cursorPosition(i) = cursorPosition(i-1);
    end

```

**UPDATE:**

It seems that the **right-click of the trackpad is registered in the second column** and not third! Seems to having solved the issue.
