none
Add-in: How to reraise F1 command after intercepting it? RRS feed

  • Question

  • I'm using a C# add-in in Visual Studio 2010 and Visual Studio 2012, and I would like to do the following:

    1. Intercept the F1 command.  If the keyword is in a specific namespace, do some custom code. If not, then do:

    2. Reraise the F1 command to the Visual Studio environment and have it processed as usual.

    I've figured out how to do #1 by using the sample code here:

    http://stackoverflow.com/questions/13942657/visual-studio-intercepting-f1-help-command

    However, I have not been able to figure out how to reraise the F1 command to Visual Studio so that Visual Studio can process it as expected.  Any suggestions?

    Wednesday, October 16, 2013 7:18 PM

Answers

All replies

  • Hello,

    After doing some research, I could not find effective resources for this issue.

    I have delivered this case to the team members who have rich technical experience for better suggestions, which might take some time.

    All of us here would appreciate your patience.

    Best Regards,

    Jane.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, October 17, 2013 8:04 AM
  • Hi Jane,

    Any update on this issue?  Thanks for your time!

    Monday, October 28, 2013 8:15 PM
  • Hi Lisa,

    Thank you for your kind reminder.

    I feel sorry for that I was not able to provide the timely information.

    Please consider reopening a new thread and posting a notification here, then  I would forward the escalation of that new thread once again.

    Best Regards,

    Jane.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, October 29, 2013 2:37 AM
  • The F1 key is originally bound to the command "Help.F1Help", so after hijacking the binding you can just call that command in your Global::F1 handler.

    In the code sample at http://stackoverflow.com/questions/13942657/visual-studio-intercepting-f1-help-command replace (of follow) the call:


                       
    HelpHandler.HandleF1 (attributes);

    with

                     _applicationObject.ExecuteCommand("Help.F1Help");


    Wednesday, October 30, 2013 9:56 PM