7

this-command-keys and this-command-keys-vector return the entire key sequence that fired the current command. However, such sequence will contain any prefix argument, too. Is there a function or variable - let's call it this-command-key-binding - to get just the key sequence for the command, without any prefix, so that (key-binding (this-command-binding)) returns the same value as this-command, even in the presence of a prefix argument?

Eleno
  • 1,428
  • 11
  • 17

1 Answers1

11

I think you're looking for this-single-command-keys.

Stefan
  • 26,154
  • 3
  • 46
  • 84