Visual Studio appears to randomly adopt American keyboard layout
Asked Answered
P

10

126

Gah! This is really causing me hassle today. Suddenly without warning '@' (at symbol) and '"' (double quote) are trading places on my keyboard but ONLY in Visual Studio 2008!

I can't seem to find anything in help or online to explain/remedy this. Is there some keyboard shortcut I am inadvertently executing?

I rebooted my PC and it went away for an hour or two and then suddenly came back.

Oh, the insanity :(

Preinstruct answered 27/1, 2009 at 17:3 Comment(5)
every now and then mine switches to fr-ca - oh sweet mystery of life!Carping
I get this in Eclipse on Windows XP.Loveliesbleeding
I get this on My office Windows XP, it switches from SwissGerman to US every now and then .. the reason is a fat-fingering of <alt Gr> and the space key (maybe shift, not always repeatable) ... the only known cure is to manualy set it back ..Sandglass
I had a similar issue wish I described on #5952460 , but it happened when I was typing Ctrl+SpacePhaedrus
I have the opposite problem - I have British English as my language, but use US keyboards out of preference. And somehow, while using Visual Studio, it occasionally switches the keyboard layout to UK. But the shortcuts to change languages are Win+Space which I am not pressing accidentally.Georgie
T
232

I have tried the same thing, but it turned out to be because I was hitting Alt+Shift in certain programs, thus triggering the language switch in Windows.

Could it be that you accidentally hit Alt+Shift or Ctrl+Shift (British layout) when coding?

Thiele answered 27/1, 2009 at 17:7 Comment(12)
Was about to post the same. It's very likely Alt+Shift when the input locale changes mysteriously.Sulfonmethane
same issue for me, only I switch from Dvorak to qwerty mid senyabj.Craving
Thx! My issue was I had hit Ctrl-Shift which switched the keyboard layout. Be sure to use Ctrl-Shift do change back before you disable this "feature".Hautrhin
I had removed all keyboard input alternatives except the one I use, and still I was able to toggle between my setup and the US setup in Visual Studio only. Weird. Had to remove the shift+alt key binding to avoid this problem.Metatherian
Fixed my problems. Thank god for this nugget of info, it was driving me insane! FEATURE.... OF.... THE.... CENTURY . . . NOT! Because it makes complete sense to be able to toggle keyboard layout on your keyboard at the press of an (easily miss-keyed) key combination. That must be used legitimately by at least... maybe, ZERO people on the PLANET...... -- Sarcastic enough?Zosima
AAAAAAAAaaaaaaaaaargh!!!!! What numb-nuts came up with this? Alt+Shift+Tab moves to the previous task in the task switcher so I hit it loads. This was driving me nuts!Calculated
+1 and since I'm live in the UK with a US keyboard toggling between the two layout makes it much easier to type the £ much easier to type :D and I agree with @Calculated they could have used a better key combo.Mysterious
Thaks a lot! I did ctrl+shift and the problem is gone (I suppose I did it without noticing in the first place)Lease
Alt-shift and the problem is gone! And I'm never allowing my cat to get near the keyboard again.Awl
Windows 10 has some of its keyboard settings moved into the new Settings app, but there's also an option in the old Region Settings to select a Region for apps that don't support Unicode. For me, this was set to English (UK) even though my only display language is English (Australia).Fecundity
To remove this ridiculous key bind in Windows 10 > Windows key > type 'advanced keyboard settings' > click 'input language hot keys' > unassign the key binds.Liquorish
Thanks, you've saved my day! I accidentally pressed alt+shift when I've tried to press alt+shift+f for auto-formatting.Bodyguard
S
87

This is Windows itself changing the keyboard layout - it's not really anything to do with Visual Studio, but it happens when you're using Visual Studio because the key combinations you use when tying in code are similar to the default key combinations Windows XP uses for switching keyboard layouts in the fly.

These instructions are for disabling keyboard layout switching in Windows XP. It's similar in other versions of Windows:-

  • Go into control panel and select Regional And Language Options.
  • Then on the Languages tab hit the Details button.
  • On the dialog that pops up, on the Settings tab, hit the Keyboard button at the bottom of it.
  • On the "Advanced Key Settings" box that pops up, select the other languages one by one and uncheck the key sequence options.
  • OK it all out and you're free from frustration :)
Sodomy answered 27/1, 2009 at 17:9 Comment(6)
That's fixed my Eclipse as well. It never really bothered me because I have a Mac at home and the @ and " are switched on that on their UK layout anyway.Loveliesbleeding
Thanks for this. It was driving me insane. In Windows 7, you can unbind the shortcut that switches languages. My only language option is English (UK) and yet it switches between US & UK english in VS; unbinding the key fixes the problem.Amorino
I've definitely had an occasion where SQL Server Management Studio (based on Visual Studio) adopted US keyboard layout for no apparent reason but all other applications were on UK layout so this wasn't a global Windows settings for me.Indonesian
Not just XP!! Windows 7 as well (for me)Freewill
I was having the same problem with SQL Server Management Studio for SQL Server 2012. I removed the extra keyboard layouts I had previously installed for testing purposes. The problem went away. Thank you!Seljuk
Disagree with your explanation. I don't even use the shortcuts in Visual Studio that changes the system locale. Just another sloppy Microsoft bug. But, this seems to "fix" the problem.Bortman
K
32

U62- Perhaps people don't mark your solution as an answer if it's not an answer for them?

It's not a CTRL+SHIFT or any other key binding problem for me.

I do not even have US-International keyboard installed, yet Visual Studio constantly reverts back to it (I can see it in the Language bar, but when I go into Control Panel, it is not in the list of installed keyboards).

It's definitely something wrong with Visual Studio, because if I then move to Notepad, Notepad knows that the keyboard is UK. Move back to VS2010 again and it is back on US International.

EDIT: the answer is to go into Visual Studio settings, and select the International Settings pane. Make sure the Language is set to "Same as Microsoft Windows". "English" seems to be the US International keyboard English.

Kingfish answered 12/10, 2010 at 9:9 Comment(6)
I've had the same thing where Management Studio goes to US layout and all other applications are on UK layout too.Indonesian
Thanks for the tip. However, you have to restart VS afterwards, which is incredibly annoying! Change the default setting randomly and then force me to restart VS. Well done VS, well done.Faro
It seems to me this a Visual Studio 2010 issue. I don't remember this being happening in the 2008 version. The option you speak about is on menu Tools > Options > Enironnment > International Settings . It seems your solution has solved my problem; may be I am speaking too early about it.Phaedrus
Damn that setting should be defaultFreewill
This fixed it for me too, but I have to say, that it started right in that moment after I installed resharper. It never ever happened before.Pronounce
Thank you SO FRIGGIN MUCH. This was driving me absolutely up the wall, and there's no indication anywhere that it's happened. And I, too, only saw it when Resharper was installed.Demark
T
14

I posted this on another question, but wanted to post the picture here in case you're not using XP, and want to see how to accomplish this in Windows 7:

enter image description here

Tove answered 30/5, 2013 at 12:21 Comment(1)
Great post. I never went to this options in 20 years of windows use. Now I finally know why Windows change keyboard "mysteriously"Ury
S
5

I know this is quite late, but nobody actually said how you disable it.

In Windows 7, go to Regional Settings -> Keyboards and Layouts -> Change Keyboards -> Advanced Key Settings -> Hot keys for input languages.

Select the "Between input languages" and change the key sequence to "Not Assigned"

Staggard answered 25/4, 2012 at 9:34 Comment(0)
D
4

Windows 7

Remove all but one keyboard from:

Control Panel >> Region And Language >> Keyboards and Languages >> Change Keyboards

enter image description here

Doggone answered 3/2, 2017 at 13:57 Comment(0)
F
1

I ran into the same problem in Visual Studio 2010 Beta 1.

However, I learned that pressing CTRL + SHIFT toggles your keyboard between Qwerty to Dvorak.

This was extremely painful when I save all (CTRL + SHIFT + S) and accidentally release before hitting the 'S' until I figured out what was causing the issue.

Fetterlock answered 17/9, 2009 at 19:15 Comment(1)
Ouch, shame Dvorak isn't more popular given it is faster!Freewill
K
1

Actually I can reproduce this following these steps. I suspect that it might have to do with the language culture of the compiled application. I have UK and US keyboard on the language bar.

I have built a simple C# Windows Forms application. I set the keyboard settings to US. I have a US keyboard although the rest of the regional settings on the machine are UK (The US version of the Micosoft keyboard I have has one less key than the UK version and it is a backslash, grr.) When I launch the application in the debugger the keyboard settings have miraculously changed back to the UK settings. This happens every time so it is not that another key is being pressed. I should also mention that this occurs in Windows Vista.

Kiangsu answered 2/3, 2010 at 9:54 Comment(0)
I
0

In XP if more than 1 keyboard input language is installed (ex: Dvorak and Qwerty) XP will flip flop randomly, particularly back to the OS's default language, and it mostly only happens when using a Microsoft application. And I'm 100% sure I'm not hitting Alt+Shift or any other key combination. This same problem will probably haunt you no matter what keyboard mappings or languages you have.

The only fix is to remove the secondary language and only add it when you need it. The other solution is to use Vista, which I notice no longer suffers from this bug (that's been in there since I started using Dvorak back in 2003 and not even XP SP3 fixed it either).

Ilyssa answered 27/1, 2009 at 17:24 Comment(0)
I
0

To changeback to the language you want in VSC:
1- you have to press Ctrl+Alt+P,or Ctrl + Shift + P
try writting there 'display laguage', it shoulp autocomplete with the option'configure display language'
2- then in the display that will appear at the top, write the language you want in case it does not appear,
3- once this is done, VSC will ask you to restart.
4- once restart is done it should be fine.

It solves the issue for me the whole time

Ineluctable answered 2/5, 2020 at 7:43 Comment(7)
Ctrl+Alt+P doesn't show me a list of languages, is there another way to get there?Spermogonium
Hi, thanks for asking, try with Ctrl + Shift + PIneluctable
Typing English after this returns no matching commandsSpermogonium
Try tiping 'configure display language', it should return the option where you can choose the languageIneluctable
you might have to install the language in vsc in case the desired one is not presentIneluctable
I edited my original answer in case it can help othersIneluctable
@AsafM where you succesful in it?, may I help you with sth else?, thaks by the way for replying to my answer, I helped me to find the errors I made and I edited acccordingly thanks to your questions, I was in he same place as you few months ago. Hope you managed.Ineluctable

© 2022 - 2024 — McMap. All rights reserved.