When I'm working in Visual Studio 2010, the IDE seems to switch to "Scroll Lock" mode at random times. Is this a new feature that I'm not aware of (initiated by some designated key/mouse-click) or a bug? I'm guessing th开发者_Go百科is is actually a computer/hardware glitch on my system, but wanted to check if anyone else is experiencing this issue?
After I'm in this "mode", I can't seem to get out of it. I've tried physically turning ScrLk on/off multiple times, highlighting text, etc. I 'crazy-clicked' my way out of it once, but have no idea how. At that point, my only option is to close the IDE and restart, then everything is back to normal.
it thinks the control button is pressed, so just press control and it should fix
Nope, it's a CTRL key bug... using the left key all the time and occasionally, VS2010 will freak out and let the mouse wheel operate independently for zooming rather than scrolling, Shift-F5 won't stop debugging, etc.
Solution for me.... hit the right CTRL key. Dunno why, but it made it go away.
This is certainly not a feature of Visual Studio itself. It is possible, although I would agree unlikely, that a third party extension is causing this behavior. To rule this out I would disable all extensions and see if the problem still occurs.
If it still occurs then I would grab another keyboard to test the hardware issue.
There is a known bug in Visual Studio 2010 that does this sort of thing. The way I have experienced it is that the left CTRL key will get "stuck" in the application (it doesn't seem to happen with the right CTRL key).
When this happens, you start to get bizarre behavior (like the scroll lock effect with when you hold the ctrl-up/down arrows, or being unable to stop debugging because it will restart the application when you do SHIFT-F5, or you change the size of the code text when you use the scroll wheel).
Unfortunately, there is no fix for it coming in for VS2010. You have the choice of living with it, or upgrading to VS2012. Others have re-mapped some of their short cuts to work around these problems.
for those who have this problem and reading this..
I found a way to bypass this problem and all you need to do is-
close the little window of Properties in the right-down corner.
and no longer you'll have this bug. :)
Do you really mean ScrollLock? AFAIK VisualStudio does not change in behavior in any way in response to ScrollLock.
I suspect what you are experiencing is VS incorrectly believes one or more of your modifier keys are held (ctrl, shift alt). To correct this press and release each of the modifier keys one at a time while VS has focus.
Real example:
The app I am debugging has focus and I am holding the ctrl key for an in-app function when I suddenly hit a breakpoint giving VS focus. However VS appears to have not registered that I have released the Ctrl key so my first attempt to scroll within the document using the mouse-wheel results in my font dpi changing... (ctrl+wheel = zoom)
Fix:
Press and release the the modifier key while VS has focus.
I had this issue where the scroll wheel on my mouse would change the zoom percentage of my open code. Pressing ALT while Visual Studio was in focus worked for me.
The solution for me was to hit the left CTRL key. Dunno why, but it made the problem go away. This answer is different than the one above suggesting to hit the right CTRL key. I tried that first but it did not fix the problem. But when I hit the left CTRL key it did fix the problem. Another option is to exit Visual Studio 2010 and start it up again.
I had this issue ever since I moved to another development machine, I thought my graphics card was the issue, almost had the boss order me new ones, as I could not get this resolved. Turns out closing the property window immediately fixed the issue!. My previous fix was to float all and not keep anything opened in the pinned tab area, which works, but is inconvenient.
精彩评论