3

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?

  • 2
    Apple meece are not compatible with real world applications- They are nice but are fiddly with any other OS other than iOS. Buy a 2+ button mouse for a few bucks? ctrl+click again- only used in iOS- never seen that in any other OS I ever used – Piotr Kula Mar 26 '13 at 12:49
  • +1 for 'just buy yourself a 2+ button mouse', better than doing all kinds of hacks 'n' tools to control it with a 1 button mouse. – Michel Mar 27 '13 at 8:19
  • 2
    @ppumkin Actually, my current Apple mouse has full double click support (I use the mighty mouse on my mac, have yet to upgrade to magic mouse) The reason why I am having issues with my current mouse is because it is from the days of power-pc, single-click apple mice. Lastly, iOS is for iPhones, iPads, and iPod Touches; Mac OSX is the OS run on iMacs. – xxmbabanexx Mar 27 '13 at 18:44
  • Mighty mouse . drool +1 – Piotr Kula Mar 27 '13 at 21:59
  • 2
    I disagree about buying a new mouse. This is a Raspberry Pi people, it's meant for hacking. Coming up with your own solution. I control mine using my Windows Phone. – Vincent P Mar 28 '13 at 5:08
4

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
  • So... exactly how do I use this? – xxmbabanexx Mar 25 '13 at 17:57
  • I've edited my answer with instructions. Tell me if you come right. – Vincent P Mar 26 '13 at 5:29
  • wow - a real demand for mac meece users out there. lol +1 – Piotr Kula Mar 26 '13 at 12:51
  • @VincetP Thank you so much - this is an awesome answer. I am going to edit it to include updated firmware and software - it didn't work until I did that – xxmbabanexx Mar 27 '13 at 19:27
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/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.