Note that there are some explanatory texts on larger screens.

plurals
  1. POMacro shortcut (Ctrl+Q, Ctrl+C) doesn't work when 'Pending Changes' view has focus and a source file is selected (Visual Studio 2010)
    primarykey
    data
    text
    <p>I have a macro which compares a file from Pending Changes view with the latest version on Source Control.</p> <p>Procedure: first I select the file, then I run the macro, and this works fine. I tried assigning several keyboard shortcuts for running this macro:</p> <pre><code>Ctrl+Q,C Ctrl+Q,Ctrl+Q Ctrl+Q,Ctrl+C Ctrl+T,Ctrl+Q Ctrl+T,Ctrl+C Ctrl+Shift+\ </code></pre> <p>I was able to assign them all in Tools->Options->Environment->Keyboard, and none of them were used for anything else (as stated in 'Shortcut currently used by'). However, for some reason Ctrl+Q,Ctrl+C and Ctrl+T,Ctrl+C don't work. The others work fine.</p> <p>So, why doesn't Ctrl+Q,Ctrl+C or Ctrl+T,Ctrl+C work? Does it try to copy the selected file in Pending Changes view instead of using Ctrl+C as second part of the macro shortcut?</p> <p><strong>Edit:</strong></p> <p>Ok, first of all this is the macro code:</p> <pre><code>Sub CompareMacro() DTE.ExecuteCommand("TeamFoundationContextMenus.SourceControlPendingChangesSourceFiles.Compare.TfsContextPendingCheckinsCompareWithLatestVersion") End Sub </code></pre> <p>I tested it out some more and this is what I found out:</p> <ul> <li>If 'Pending Changes' view has focus, and an item from 'Source Files' list is selected (as it must be for this macro to work), the window will simply not accept the Ctrl+C combination and status bar will just keep displaying '(Ctrl+Q) was pressed. Waiting for second key of chord...' <ul> <li>Note: I tried pasting from clipboard after these actions and it looks like it did a copy operation with that Ctrl+C part - I got something like 'Filename.cs edit D:\path...' when pasting.</li> </ul></li> <li>If 'Pending Changes' view has focus and no item from 'Source Files' list is selected (I can deselect all by restarting visual studio), the shortcut will work, but macro will fail as expected (since it requires an item to be selected).</li> <li>If an item from 'Source Files' is selected, and focus is moved from pending changes window to any other visual studio window (well at least the ones I tried: such as main window, Solution Explorer, Find Symbol Results etc.) the shortcut and macro WILL work. It doesn't matter if I move focus before pressing any key OR after pressing Ctrl+Q but before Ctrl+C, it will work in both cases.</li> <li>I even tried selecting some code in main visual studio view, putting focus on that main view - the shortcut and macro will work without this code being copied to clipboard (unlike when the focus was on 'Pending Changes').</li> </ul> <p>Does 'Pending Changes' handle Ctrl+C in such cases differently than other views?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload