5

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.

Sudar
  • 317
  • 4
  • 11
  • what prevents you from connecting a mouse to RasPi? – lenik Sep 01 '13 at 03: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 Sep 01 '13 at 06:26
  • 1
    there are wireless mouse/keyboard combos, that will occupy only one USB slot for wireless module. – lenik Sep 01 '13 at 08: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 Sep 01 '13 at 11:06

2 Answers2

2

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

http://tuxradar.com/content/xdotool-script-your-mouse

rob
  • 2,803
  • 2
  • 21
  • 31
2

UPDATE:

Navigate using Arrow keys.

  • Hit the "OK" key to select

or

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

Works on my Ras Pi 2 with OpenElec.

CraigW
  • 21
  • 2
  • 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 Dec 09 '15 at 18:59