
VS10은 단축키로 가득 차 있는데, 그 중 대부분은 쓸모없고 때로는 짜증스럽기까지 합니다. 모두 지우고 실제로 원하거나 사용하고 싶은 몇 가지 단축키만 설정하고 싶습니다. 목록을 탐색하고 각각을 수동으로 삭제하는 것은 꽤 지루합니다.
모든 단축키를 한 번에 누킹하는 빠른 방법이 있습니까?
어쩌면 값싼 스크립팅일까요? 우아할 필요는 없습니다.
("편집기에서 왼쪽 화살표"와 같은 항목이 손실될 수 있다는 것을 알고 있지만 이러한 몇 가지 항목은 쉽게 수정할 수 있습니다.)
답변1
원하는 변경을 수행하는 매크로(또는 2012+의 경우 PowerShell 스크립트)를 생성할 수 있어야 합니다. 현재 테스트할 수 있는 VS 2010의 작동 버전이 없지만 다음과 같이 작동할 것입니다.
Sub ClearBindings()
Dim cmd As Command
Dim props As EnvDTE.Properties = DTE.Properties("Environment", "Keyboard")
Dim prop As EnvDTE.Property
' Because you cannot programmatically change the default keyboard
' mapping scheme settings, you must first make a copy of the
' Default Settings for the Keyboard Mapping Scheme.
prop = props.Item("SchemeName")
' Sets the Scheme property value to a new keyboard scheme.
' This saves the old keyboard mapping scheme and allows you
' to add new key mappings.
prop.Value = "%LOCALAPPDATA%\Microsoft\VisualStudio\10.0\NoKeyBindings.vsk"
For Each cmd In DTE.Commands
cmd.Bindings = ""
Next
End Sub