Visual Studio appears to randomly adopt American keyboard layout

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 :(

47765 次浏览

我也试过同样的方法,但结果是因为我在某些程序中按了 Alt + Shift 键,从而触发了 Windows 中的语言切换。

有没有可能你在编码的时候不小心按了 Alt + Shift 或者 Ctrl + Shift (英国布局) ?

这是 Windows 本身改变了键盘布局——这和 Visual Studio 没什么关系,但是当你使用 Visual Studio 的时候就会发生这种情况,因为你在输入代码时使用的组合键与 Windows XP 在动态切换键盘布局时使用的默认组合键类似。

这些说明用于禁用 Windows XP 中的键盘布局切换。它与其他版本的 Windows 类似:-

  • 进入控制面板,选择区域和语言选项。
  • 然后在“语言”选项卡上单击“详细信息”按钮。
  • 在弹出的对话框中,在“设置”选项卡上,点击其底部的“键盘”按钮。
  • 在弹出的“高级键设置”框中,逐一选择其他语言并取消选中键序列选项。
  • 好了,一切都过去了,你就不会沮丧了:)

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.

唯一的解决办法是删除辅助语言,只有在需要时才添加它。另一个解决方案是使用 Vista,我注意到 Vista 不再受这个 bug 的困扰(自从我2003年开始使用 Dvorak 以来,这个 bug 就一直存在,甚至连 XP SP3也没有修复它)。

我在 VisualStudio2010Beta 1中遇到了同样的问题。

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

这是非常痛苦的时候,我保存所有(CTRL + SHIFT + S)和意外释放之前,击中’S’,直到我发现是什么造成的问题。

实际上,我可以按照以下步骤重现这个过程。我怀疑这可能与已编译应用程序的语言文化有关。 我有英国和美国键盘上的语言栏。

我已经构建了一个简单的 C # Windows 窗体应用程序。 我把键盘设置为 US。我有一个美国键盘,虽然机器上的其他区域设置是英国(美国版本的微软键盘我有一个比英国版本少一个键,它是一个反斜杠,grr。) 当我在调试器中启动应用程序时,键盘设置奇迹般地变回了英国设置。 这种情况每次都会发生,所以不会有人按下另一个键。 I should also mention that this occurs in Windows Vista.

U62-也许人们不会把你的解决方案标记为一个答案,如果它不是他们的答案?

这不是一个 CTRL + Shift 或任何其他键绑定问题为我。

我甚至没有安装 US-International 键盘,但是 Visual Studio 不断地恢复到它(我可以在语言栏中看到它,但是当我进入控制面板时,它不在安装的键盘列表中)。

这肯定是 Visual Studio 的问题,因为如果我转到记事本,记事本知道键盘是英国的。回到 VS2010再次和它回到美国国际。

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.

我知道现在很晚了,但没人告诉你怎么关掉它。

在 Windows 7中,进入区域设置-> 键盘和布局-> 更改键盘-> 高级键设置-> 输入语言的热键。

选择“在输入语言之间”并将键序列更改为“未分配”

我在 另一个问题上发布了这张照片,但是我想在这里发布这张照片,以防你不使用 XP,并且想看看如何在 Windows 7中实现这一点:

enter image description here

Windows 7

除了一个键盘外,删除所有键盘:

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

enter image description here

要变回你想在 VSC 中使用的语言:
1- you have to press Ctrl+Alt+P,or Ctrl + Shift + P
尝试在那里写“显示语言”,它应该自动完成与选项“配置显示语言”
然后在将出现在顶部的显示中,写下你想要的语言,以防它不出现,
3-一旦这样做,VSC 将要求你重新启动。
4-一旦重启完成,应该就没问题了。 < br >

它一直在帮我解决问题