4

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 Sep 1 '13 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 Sep 1 '13 at 6:26
  • 1
    there are wireless mouse/keyboard combos, that will occupy only one USB slot for wireless module. – lenik Sep 1 '13 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 Sep 1 '13 at 11:06
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

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.

  • 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 9 '15 at 18:59

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.