I have only a keyboard attached to my Raspberry Pi. How do I simulate a mouse right click from keyboard itself?

I tried various keys like Shift + F10, Alt + . and also the right click button in my keyboard, but nothing seems to be working.

I am running the latest version of Raspbian.

  • what prevents you from connecting a mouse to RasPi?
    – lenik
    Commented Sep 1, 2013 at 3:47
  • I have connected a pen drive in the other USB port and if connect my USB hub, then I need to provide extra power to it :(
    – Sudar
    Commented Sep 1, 2013 at 6:26
  • 1
    there are wireless mouse/keyboard combos, that will occupy only one USB slot for wireless module.
    – lenik
    Commented Sep 1, 2013 at 8:03
  • @lenik Yeah I am not denying any of that. But right now, all I need is to just simulate the right click. If I can do that, then I can start using Raspberry Pi for my presentations, without any additional hardware.
    – Sudar
    Commented Sep 1, 2013 at 11:06

2 Answers 2


you can install a command line tool xdotool that will emulate the click for you. Should be installed on the Pi by default.




Navigate using Arrow keys.

  • Hit the "OK" key to select


  • Hit the "C" key to bring up the Context-Menu

Works on my Ras Pi 2 with OpenElec.

  • 3
    Hello and welcome. Please note that you can always edit your own posts, in this case the first answer of yours. I suggest to merge both posts into one comprehensive, well formated answer.
    – Ghanima
    Commented Dec 9, 2015 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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