0

I want to bind multiple keys interactively to a single function using global-set-key.

For example, let M-. g bind to project-find-file function.

How to achieve this?

1 Answer 1

1

M-x global-set-key, followed by hitting the key and entering the command to bind to it.

Do that twice, once for each key.

You ask how to interactively bind multiple keys. That's the way. There's no special provision for binding multiple keys to the same command using a single command invocation.

But you can use M-p to retrieve your command-name input, project-find-file for the second binding, so you don't have to type/complete it again.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.