views:

101

answers:

1

Every now and then my keyboard in Visual Studio gets all screwy. For example Shift + 3 inserts a pound symbol instead of a hash #. Shift + \ inserts a tilde ~ instead of a pipe |. When this happens it only affects the current instance of VS - even if I have multiple VS windows open. Only VS is affected - Notepad and other windows apps are fine. Closing and then reopening the solution I was working on in a new VS 2008 instance resolves the problem.

Does anyone have any idea what key combination I have accidentally pressed to cause this? And how to revert it?

+3  A: 

I had a similar problem (on Windows XP), where my keyboard settings would change without me knowing. @ would swap with “, # with /, etc. It turned out that there’s a built-in Windows keyboard shortcut to swap between keyboard layouts, and it’s ALT + Shift! I must have been accidentally pressing these together every so often.

I fixed the problem by going into the Control Panel, selecting 'Regional and Language Options', then moving to the Language tab and clicking the Details button. This shows you a list of all the alternative keyboard layouts that you have available. I just deleted all but the one I wanted, so that I no longer have an alternative layout to swap to.

Charles Anderson
+1. I use this feature all the time :D.Changing the keyboard layout is per-application, which explains the OP's behaviour. I'd bet OP also has UK keyboard installed.
Bahbar
Thank you so much!
Evs