visual-studio 在 Visual Studio 中停止鼠标选择
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4294298/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Stopping mouse selection in Visual Studio
提问by serhio
I don't know what key combination I did, but now each time I click somewhere in the page, Visual Studio selects the text between first and second mouse click.
我不知道我做了什么组合键,但是现在每次我单击页面中的某个位置时,Visual Studio 都会选择第一次和第二次鼠标单击之间的文本。
I tried to escape from this "selection mode", but nothing helps, nor Escape, nor left clicks, nor Ctrl+Up/Down. I opened another VS window and there is all right - normal selection.
我试图摆脱这种“选择模式”,但没有任何帮助,也没有退出,也没有左键单击,也没有 Ctrl+Up/Down。我打开了另一个 VS 窗口,一切正常 - 正常选择。
What is it, how to cancel it, what is it for?
它是什么,如何取消它,它有什么用?
I should probably restart Visual Studio. I remember that that happened some times ago in VS 2005. Very annoying VS "feature".
我应该重新启动 Visual Studio。我记得那件事发生在 VS 2005 中。非常烦人的 VS“功能”。
P.S.It disappeared as suddenly as it appeared, but I found similar problem described here. The guy says that "The only way to stop is to press escape or shift and an arrow key."
回答by Valery Letroye
I have very often the same issue, just after stopping the debugger. No idea how it starts... But I found the key combination to stop it: Press "Alt Gr"+"Ctrl(right)"+"Shift(right)"
在停止调试器之后,我经常遇到同样的问题。不知道它是如何开始的......但我找到了停止它的组合键:按“Alt Gr”+“Ctrl(右)”+“Shift(右)”
回答by Daniel
I figured out how to turn this issue on and off: Just press the ins(Insert) key; If you're using a full sized keyboard it will be to the right of backspace and above delete or if you're using a smaller keyboard it'll be the second option of zero key on the number pad to the right of the right arrow key.
我想出了如何打开和关闭此问题:只需按ins(插入)键;如果您使用的是全尺寸键盘,它将位于退格键的右侧和删除上方,或者如果您使用的是较小的键盘,它将是右箭头右侧数字键盘上零键的第二个选项钥匙。
回答by Bmize729
Click on tools and then options. Under environment select keyboard. Then there will be a window open up with options. The first drop down says something about mapping. Set that to default.
单击工具,然后单击选项。在环境下选择键盘。然后将打开一个带有选项的窗口。第一个下拉菜单是关于映射的。将其设置为默认值。
Brief, if this was previously selected, is an old DOS format and the key bindings will cause similar actions.
简而言之,如果这是以前选择的,则是旧的 DOS 格式,键绑定将导致类似的操作。
回答by Nils Lande
I have experienced the same problem (VS 2010). Here is what happens:
我遇到了同样的问题(VS 2010)。这是发生的事情:
I start the debugger on a project whith Unmanaged debugging enabled. When I try use the key combination Ctrl+Shift+L to delete a line I get a dialog saying 'Changes are not allowed when unmanaged debugging is enabled'. The title of the dialog is 'Edit and Continue'. When the dialog is closed the editor gets stuck with this behavior:
我在启用非托管调试的项目上启动调试器。当我尝试使用组合键 Ctrl+Shift+L 删除一行时,我收到一个对话框,提示“启用非托管调试时不允许更改”。对话框的标题是“编辑并继续”。当对话框关闭时,编辑器会陷入这种行为:
Shift+Right-Click behavior: It selects the text between the cursor and the position of the mouse-click
Ctrl+Scroll behavior: If I try to scroll using the mouse wheel it will zoom in or out instead.
Shift+右键单击行为:它选择光标和鼠标单击位置之间的文本
Ctrl+Scroll 行为:如果我尝试使用鼠标滚轮滚动,它将放大或缩小。
It behaves like the Shift and Ctrl keys are being held down.
它的行为就像按住 Shift 和 Ctrl 键一样。
I have found these key combinations that will get me out of this situation:
我发现这些组合键可以让我摆脱这种情况:
Shift + Arrow down
Ctrl + Arrow down
Shift + 向下箭头
Ctrl + 向下箭头
Until I discovered this I had to restart Visual Studio.
在我发现这一点之前,我不得不重新启动 Visual Studio。
回答by Eric Moon
I have this issue when I VPN to a machine running VS. Here is the key combination I have found to get me out of this state. I do a ctrl-f to open the find window. I type some characters in the find textbox and I notice that the letters are all capital (even though I did not set the caps lock). I hit the caps lock key and test using the find text box to make sure my caps lock is not set (lowercase). Once the lowercase is set, the selecting text between mouse clicks behavior goes away. Don't know why, but this works for me.
当我 VPN 到运行 VS 的机器时,我遇到了这个问题。这是我找到的让我摆脱这种状态的关键组合。我按 ctrl-f 打开查找窗口。我在查找文本框中键入了一些字符,我注意到这些字母都是大写的(即使我没有设置大写锁定)。我按下了大写锁定键并使用查找文本框进行测试,以确保我的大写锁定未设置(小写)。一旦设置了小写,鼠标点击行为之间的选择文本就会消失。不知道为什么,但这对我有用。
回答by R J
Use the (insert) Key in the Key board.
使用键盘中的(插入)键。

