5

Return to the FAQ


I have a single click apple mouse which I am using to control my Raspberry Pi. I am using the recommended Raspbian "Wheezy".

Is there a way for me to make it so that ctrl-click is right click?

Ingo
  • 42,961
  • 20
  • 87
  • 207
xxmbabanexx
  • 3,278
  • 7
  • 36
  • 56

2 Answers2

6

I dont have a Apple Mouse, but this mouseemu should work.

  • emulate middle and right click
  • emulate mouse wheel
  • block trackpad while typing

First, update your firmware and software.

sudo apt-get update

Then:

sudo apt-get upgrade

Now, install mouseemu by typing:

sudo apt-get install mouseemu

You might also need to restart (you could also just restart services, but the RPi reboot's quickly enough).

How to Use MouseEmu

mouseemu’s default configuration file is stored in /etc/default/mouseemu

Open the file by typing the following command in a terminal window.

sudo nano /etc/default/mouseemu

Look for the following line, this line will make the middle click work while holding down the left Apple (also known as splat) key.

#MID_CLICK=”-middle 125 272″ # Left Apple Key (LEFTMETA) + click

The following line will enable the right click while holding down Left ctrl

#RIGHT_CLICK=”-right 29 272″ # Left Ctrl + click

Uncomment the previous two lines by removing the # in the beginning of the line. Now save the file ctrl + x (follow the instructions for saving, should be the y key and then enter key).

Then either restart your Raspberry Pi or try restarting the mouseemu service by typing the following. NOTE I'm not 100% sure of the syntax here.

Retart service

sudo /etc/init.d/mouseemu restart

Restart Raspberry Pi

sudo reboot
xxmbabanexx
  • 3,278
  • 7
  • 36
  • 56
Vincent P
  • 2,210
  • 15
  • 24
1

you can directly map any spare key to any mouse button:

http://promberger.info/linux/2008/06/03/binding-a-key-to-the-middle-mouse-button-with-xmodmap-and-xkbset/

sparkie
  • 435
  • 3
  • 9