7

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 this 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.

JaredPar
  • 733,204
  • 149
  • 1,241
  • 1,454
Jess
  • 2,991
  • 3
  • 27
  • 40
  • I noticed the same problem and I am unable to pinpoint the cause. It does not happen a lot, I would say 1 time per month, and by the time I realize that I am in this locked state, then it is too late to determine what I did to get in there. Until we find a solution, I have to do the same; close IDE and re-open and problem is gone. – Leons May 09 '11 at 16:43
  • @Leons - do you happen to use MS Natural Keyboard, or a Kensington Expert Mouse? – Jess May 10 '11 at 01:58
  • None of those. I have a Dell keyboard and Microsoft mouse. I experience the same thing on my work computer. There I have a cheap Dynex keyboard and Microsoft mouse. – Leons May 10 '11 at 02:14
  • Same behavior - Logitech keyboard or MacBook Pro keyboard. Happens maybe 1 in 100 times on exit from debugging. Oddly I just managed to exit the behavior using Ctrl-Scroll Lock ... – Ian Mercer Apr 18 '12 at 16:30
  • Same problem in Visual Studio 2012! Keyboard "locks"; pressing the cursor keys results in switching between windows. No idea how to get out of this ! – SQL Police Aug 15 '13 at 07:40
  • related: http://blogs.msdn.com/b/oldnewthing/archive/2008/02/11/7596539.aspx – Jay Wick Feb 26 '14 at 05:14
  • Updating a very old thread, but I haven't seen this bug in Visual Studio 2013. – Jess Jan 24 '15 at 23:27

9 Answers9

6

it thinks the control button is pressed, so just press control and it should fix

Robert Lamont
  • 69
  • 1
  • 2
2

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.

Jon
  • 1,675
  • 26
  • 57
1

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.

BIBD
  • 15,107
  • 25
  • 85
  • 137
1

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. :)

Noa
  • 25
  • 1
  • 6
1

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.

JaredPar
  • 733,204
  • 149
  • 1,241
  • 1,454
  • Other users seem to be having the same issue so I don't think its the keyboard; I'll have to think about what / if any extensions I have loaded. – Jess Apr 20 '12 at 04:59
0

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.

L0uis
  • 703
  • 5
  • 8
0

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.

Mark
  • 1
0

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.

Mike
  • 1,525
  • 1
  • 14
  • 11
0

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.

James
  • 1,973
  • 1
  • 18
  • 32