Emacs: mitigating dependancy on the mouse
Asked Answered
M

1

7

In Emacs, how does one emulate mouse button presses and the like using a keyboard? For example, with CEDET's Semantic (included with GNU Emacs 23.2.1), includes can be right clicked to provide a menu; how can I make that menu, and others, with the keyboard, appear as a tooltip or in the minibuffer a la M-` that allows one to access the menu bar?

Magruder answered 30/5, 2010 at 22:26 Comment(2)
I literally had no idea there was a hotkey to access the menu bar. I'm slightly proud of thatWeinstein
I didn't know that either... I'm moving towards a mouseless UI, and learning emacs well is just the start of that.Marjana
H
6

You can find out what command the mouse-click is running using C-h k (describe-key), followed by the mouse-click in the appropriate place. You could then bind that to something on the keyboard.

It's not exactly what you're asking, but you should be able to use it to accomplish the same thing for all the clicks you care about.

Hypochromia answered 31/5, 2010 at 4:5 Comment(2)
The C-h k plus command (using shortcuts, not the name of the key) is just what I was looking for :)Deonnadeonne
How can we approach things like flyspell-correct-word? If called explicitly via M-x, it says flyspell-correct-word must be bound to an event with parameters. It would be nice to exactly send mouse event at a point. Well.. this one has flyspell-correct-word-before-point but it is not universally applicable for other cases.Lonna

© 2022 - 2024 — McMap. All rights reserved.