2

I'm writing a little VS addin, which has a shortcut to it. It calls the Exec method fine, but I don't see a way to figure out whether it was called using a shortcut, or clicking in Tools menu. I'm sure it's there somewhere, but the documentation is lacking..

Thanks !

Evgeni
  • 3,341
  • 7
  • 37
  • 64
  • Why do you need that? Why should the behaviour be different if it is executed via a shortcut? Just curious. –  Feb 13 '11 at 02:06
  • Plugin can do multiple things, I think having a direct access to them would be nice. – Evgeni Feb 13 '11 at 18:11
  • Although since only a single shortcut combination is displayed in Tools menu, this is not that useful, I guess. – Evgeni Feb 13 '11 at 18:42

1 Answers1

1

I checked and simply there is no simple way as of i know... and also according to normal practice and behavior addin should not behave differently. It should be independent of the way its executed.

Shekhar_Pro
  • 18,056
  • 9
  • 55
  • 79
  • However, plugin can have multiple shortcuts attached to it... Making it a bug ? – Evgeni Feb 13 '11 at 18:06
  • ita not bug its a feature.. :) – Shekhar_Pro Feb 13 '11 at 18:38
  • Having no way of knowing is a pity indeed. I also wrote an add-in, it works when called from the Menu, but fails when called by a keyboard shortcut. I wish Visual Studio behavior were more consistent (and that the SDK gave more access to its functions). – wip Oct 22 '13 at 02:28