Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 2 problems with Shift+right click menu

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Ivo Posted - Nov 25 2006 : 2:31:51 PM
Hi

Now that the refactoring button can be turned off (thank you, thank you ), I'm trying to use Shift+right click to access the VAX menu more often. I'm seeing 2 problems:

1) Sometimes, maybe 1/3rd of the time if I select a symbol and try to open the menu one of the commands is immediately executed on its own. Usually it is the "Find References", but I've seen the "(...)" happen also. The behavior is very inconsistent and is probably related to the position of the menu and the position of the mouse cursor. To reproduce it, select a symbol and try to open and close (with Escape) the VAX menu. Usually on the second or third try it will execute "Find References" on its own. It happens in VS6 and VS2003. Most often it happens for function definitions.

2) The regular right click moves the cursor to the clicked point and then opens the menu. For example I can right click on a symbol and select "Go to definition". The Shift+right click doesn't move the cursor. The problem with this is that the menu I'm seeing applies to the symbol where the cursor is, not the symbol where I clicked.

Ivo
23   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jul 07 2007 : 12:30:26 AM
case=3797 is fixed in Build 1559
Ivo Posted - Feb 15 2007 : 3:35:59 PM
Yeah, that's in 2005. I would guess 2003 has similar functionality, but not VC6.
jpage4500 Posted - Feb 15 2007 : 3:18:59 PM
Hmm.. I guess this is a feature of newer Visual Studio versions. I don't see the Context Menu's in the toolbar tab (VC++ 6)
Ivo Posted - Feb 15 2007 : 12:51:17 PM
quote:
Originally posted by jpage4500

How can you edit the default VC++ context menu? This would be a great alternative than using Shift + Right-click.


You select Tools\\Customize, click on the Toolbars tab, select "Context Menus" (3rd from the top). That will open a toolbar with one item for each context menu category. You want Editor Context Menus\\Code Window. I was able to add "Find References" and "Move into Project List" to the menu.

Unfortunately you can't add everything from the VAX menu there. For example if you add "Refactor Context Menu" it will not appear as a submenu but as a simple item. If you select it a new menu will open where you can select "Rename", etc.
jpage4500 Posted - Feb 15 2007 : 12:33:40 PM
Hi,

I've also noticed problems in past versions of the VA context menu automatically pasting even though I just did a simple Shift+Right-click.

How can you edit the default VC++ context menu? This would be a great alternative than using Shift + Right-click.

btw: this is somewhat related to a post I just added; http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=5926
feline Posted - Feb 05 2007 : 6:13:34 PM
Cunning. I had never thought to edit the default IDE right click menu, and I hardly ever try to change the main IDE menu's.

You can bind a keyboard shortcut to Find References, but if you are more mouse focussed this may not help.
Ivo Posted - Feb 05 2007 : 3:16:29 PM
I partially solved this by adding some of the commands to the regular right-click menu. For example "Find References".

Ivo
feline Posted - Feb 05 2007 : 2:43:09 PM
I have bumped the priority on this a bit for you. I agree that this does sound fairly easy, but it may not be quite that easy in reality. Sometimes making the IDE do what we want it to do can be rather difficult.
schoenherr Posted - Feb 05 2007 : 01:13:07 AM
hello,
what about case 3797?
I think it should one of the bugs which can be fixed quite easy and it would improve the usibility of the context menu a lot.
feline Posted - Dec 14 2006 : 10:21:44 AM
I did not know that Shift+F10 did that, but it works here as well. Hopefully this is a good workaround for now. You can also assign your own keyboard shortcut via the command:

VAssistX.OpenContextMenu

It is definitely interesting that there is no problem opening the menu this way. I am not sure what it means, but it does suggest there is something about the mouse that is causing this problem.
JoeS Posted - Dec 13 2006 : 3:06:17 PM
I don't see this problem with the refactoring context menu. The ways I know how to get to it: 1) Through the shift-right click (obviously doesn't work, because shift-right click doesn't). 2) The VAssistX menu, works normally. 3) Keyboard shortcut for the refactoring context menu, works normally (although I'm not using the mouse, it's a keyboard shortcut).

I don't have a right click key on my keyboard, but I did find that if I press Shift+F10 the VAssist context menu appears and works correctly! A clue?

feline Posted - Dec 13 2006 : 12:30:20 PM
Do you ever see this problem with the refactoring context menu?

Can you try the following quick experiment please, move the mouse well away from the caret and then using the keyboard only trigger the VA shift + right click menu by holding down the shift key and pressing the right click key on your keyboard, assuming you have one.

I am not sure if this will prove anything, but it might offer a clue.
JoeS Posted - Dec 13 2006 : 12:16:15 PM
I'm also seeing this same problem with 1541 (I have no previous version experience). I will put the caret anywhere in the file (symbols, but I even tried the middle of a block comment), shift+right-click, and almost immediately (<300ms) the Paste menu is auto selected and the first choice in the submenu is selected and pasted. My normal routine is to press and hold the shift button, then right click (not moving the mouse at all), and then I usually hold the shift for a while longer before (remembering) to let it go. I've found that if I very consciously lift the shift immediately after the right click, or if I jerk the mouse down towards the area the context menu will appear just after the right click, I can get it to stay up. I rebuilt my entire database - it still happens. I also reset my keyboard settings back to Default - it still happens. As Ivo noted, this is definitely not a "mouse is just over the menu" issue - the mouse remains at the top left corner of the context menu and the paste submenu is very quickly activated - AND if I pick a symbol at the bottom of the screen so the mouse appears at the lower-left corner of the context menu I can still get it to happen. I never use right click in VA View, I never use clipboard history. I use the refactoring context menu often.
feline Posted - Nov 29 2006 : 12:33:37 PM
Ivo and Uniwares, do you trigger any of the following often:
* right click menu in VAView
* clipboard history - CTRL-SHIFT-V
* refactoring context menu

if so do you see these problems in any of these other menus?

It is not obvious why this problem would only show up on the shift + right click menu, but if it does then this is a helpful clue.
Ivo Posted - Nov 28 2006 : 6:18:19 PM
No, that was my first guess, but that's not the case. In my example the cursor is in the middle of CWindowImpl, the mouse pointer is in the same position, and there is enough room to show the full menu. The screen resolution is 1600x1200. When the menu opens the mouse is exactly at the top/left corner, so the selected item should be "Insert/Remove Breakpoint". Instead, the "Paste" menu is opened, the "Paste" text is selected, and the first item in the sub-menu is also selected.

Normally that should happen only if the mouse is scrolled down to "Paste", then moved horizontally to the right end of the menu box. That's exactly what happens if I click on another symbol, or on a blank area. Which reminds me, I have the "Virtual Space" option enabled. ( After a quick test, apparently the "Virtual Space" option has no effect on the bug).

Also, because of #2 above, it doesn't matter at all where the mouse is. What matters is where the cursor is. So I can make the bug appear or not by clicking on the same exact spot in the screen, but with different position of the cursor. So it's not a matter of the position of the menu, or the position of the mouse relative to the menu.

Something even weirder just happened as I was testing. After Shift+click the menu opened and again the "Paste" menu was opened with the first item already selected. As I was holding the Shift button I moved the mouse up/down the menu. The selected item changed to the one under the mouse for a frame, and then switched back to "Paste". As soon as I release the Shift button, the menu started behaving normally. Then I pressed Shift again, and the problem reappeared. Same thing happens if I open the menu with Shift+the menu key, and then move the mouse over the menu with the Shift held down. The behavior is exactly the same as if I hold down the P button.

Here's my theory - somehow if the Shift button is held down and the mouse is moved over the menu box, it acts as a random accelerator key. If it happens to be an invalid accelerator, or if it belongs to a disabled command, nothing happens. If it is an accelerator for a sub-menu, that sub-menu opens on its own (like P for Paste). If it is an accelerator for an actual command (like d for Find References), the command is executed.
feline Posted - Nov 28 2006 : 5:49:14 PM
I wonder...

Ivo I am assuming for the moment that this is the top of a file, and it is a short file. Based on these wild assumptions the bold words all place the menu and mouse in a certain position, relative to each other.

I can make the paste sub-menu open automatically when I use shift + right click by resizing the IDE window and moving the mouse around so that when the VA menu appears the mouse is positioned over the paste item in the main menu. Since the mouse is now over the menu this immediately becomes the active menu item and the sub menu opens.

I get exactly the same problem when opening the OS's Start menu if my mouse is in that corner of the screen, which is a pain since I prefer to use the keyboard to navigate the menu.

Now this is a LONG shot, and it does not explain the way the problem appears and disappears for Uniwares, but can you have a look at the menu and mouse positions to see if it could be a factor?

If the menu is not constrained horizontally then the menu appears positioned so that the mouse is on the very edge of the menu, but not over it, so it does not select any items.

edit - I did try your code here, but I am not seeing any problems, it was while trying the code that the "odd" positioning of the bold items occurred to me.
Ivo Posted - Nov 28 2006 : 4:46:13 PM
Today I'm seeing a different behavior. On the same machine that yesterday Paste was executed automatically, now the "Paste" menu opens, the first item in the list is selected, but not executed. This only happens on certain symbols. For example:

class CComboTooltip: public CWindowImpl<CComboTooltip>
{
BEGIN_MSG_MAP_EX(CComboTooltip)
MSG_WM_PAINT(OnPaint)
END_MSG_MAP()

~CComboTooltip( void );
void Create( void );

protected:
void OnPaint( HDC );
};

If the cursor is on one of the bold symbols, the Paste menu opens. Otherwise the Paste menu stays closed, and the first item in the menu is selected (Insert/Remove Breakpoint).

This is on WinXP SP2, VS2003, VAX 1541.
feline Posted - Nov 28 2006 : 2:54:35 PM
I remember this coming up before on your machine Uniwares, but from memory the effect just went away at some point.

I have never been able to reproduce this effect, and neither has anyone else to my knowledge. *sigh* Not exactly helpful.

Are either of you running a localised OS or IDE?
Are you using custom colour schemes, themes, or anything else like that? This is grasping at straws, but I am trying to find any sort of clue to help point us in the right direction.
Ivo Posted - Nov 27 2006 : 8:01:02 PM
I did some tests on another machine (WinXP, SP2), running VS2003. I couldn't reproduce the "Find References" bug or the "(...)" bug.

But I noticed something else - when I press Shift+right click the "Paste" sub-menu is opened. The first time after VAX 1541 installation the Paste menu was empty, so the worst that happened was that I got an empty sub-menu that opens on its own. But after I copied something to the clipboard, the first item in the Paste menu started executing on its own.

So I think the bug is that a random command from the context menu decides to execute on its own as soon as the menu is opened. Maybe the bug is always present, but if you are lucky the bug will choose one of the disabled commands and nothing will happen.

I couldn't find a correlation with the clicked point or the screen resolution. It happens on two completely different systems with different Windows versions, different Visual Studio versions and different sets of installed programs.
Uniwares Posted - Nov 27 2006 : 6:37:13 PM
Since I initiated discussion of this problem (#1) long time ago, let me add some info here:
This problem has NOTHING to do with any addin/utility. clean machine, same problem.
I didnt have this problem for a long time, now with 1540 it "returned". Not sure altough if its related to the project type, the moon or the OS version (WinXP here).
Speed doesnt matter either. Press shift, [wait half hour (optional)], right click -> there it goes...
feline Posted - Nov 27 2006 : 12:51:28 PM
I have just opened the VA right click menu 20 or 30 times in VC6, right clicking on various parts of the screen and no problems at all.

This is running on win2k, with VA 1541, English OS and English IDE, no other plugin's installed.

Are you running any system utilities or programs that might be a factor? Window Blinds from Stardock leaps to mind as one possibility.

Another possibility is something to do with the speed / order of the keyboard and mouse press, but if so then you should be able to stop this happening by doing the shift + right click in a slow and controlled manor.
Ivo Posted - Nov 27 2006 : 11:37:38 AM
I'm using the latest - 1541.
I have only used the VAX context menu very rarely until now, so I can't tell if previous versions do the same.
At work I'm still using an older one and I'll try it today. AFAIK it doesn't have the "Find References" feature though.
At home (where I see this problem) I'm using a US version of Win2K, with English version of VS6 and English version of VS2003. Nothing odd as far as I can tell.
VS6 has no other plugins installed. VS2003 has my VSHelper plugin.

I'll do some more testing on different machines and OSes, and I'll post my findings here.

feline Posted - Nov 27 2006 : 08:26:23 AM
point 1, we have had a few reports of this before, but I have never been able to reproduce this.
* Which version of VA are you using?
* Have you seen the same effect with different versions of VA?
* can you reproduce this in a different project, or on a different machine?
* do you have any other plugin's installed?
* do you have a localised OS or IDE?
* is there anything "odd" or unusual about your system?
* is it possible to get a screen capture movie of this effect? If it depends on subtle things like the positioning of the mouse and menu on the screen then pinning this down could be quite tricky.

point 2, a fair point

case=3797

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000