right-click macbook + ubuntu

The touchpad on the macbook has only one mouse click button, but it is possible to map a keystroke to act as the mouse right-click.

To map the right command key as the mouse right-click add the following command to /etc/rc.local

xmodmap -e ‘keycode 116 = Pointer_Button3′

You then need to open ‘System->Preferences->Sessions’ and click ‘add’ in the ‘Startup Programs’ tab to execute the command when you login.  Fill in the Name field with whatever you want and then enter ‘/etc/rc.local’ in the command entry field and click ‘ok’.

Next time you login you can use the right command key as the mouse right-click.

1 Comment »

  1. sakibfarid said

    great tutorial!

RSS feed for comments on this post · TrackBack URI

Leave a Comment