我想分配爲什麼我無法在PowerShell ISE中創建快捷鍵Ctrl + U和Ctrl + Shift + U?
- CTRL + ü
- CTRL + SHIFT + ü
一些PowerShell的ISE Addonmenu功能,但說似乎被分配給一些Windows功能。
我沒有在當前的在線快捷方式列表中找到它們,或者是否有一些應用程序可以創建全局快捷方式,即使在其他應用程序關注焦點時也可以使用這些快捷方式?
編輯:
我改了稱呼,認識之後,這是一個PowerShell ISE的問題,沒有一般的Windows問題。
這裏是代碼
$psISE.CurrentPowerShellTab.AddOnsMenu.Submenus.Add("Test 1",{Write-host 'test 1'}, "CTRL+SHIFT+U")
$psISE.CurrentPowerShellTab.AddOnsMenu.Submenus.Add("Test 2",{Write-host 'test 2'}, "CTRL+U")
Exception calling "Add" with "3" argument(s): "The menu 'Test 1' uses shortcut 'Ctrl+Shift+U', which is already in use by the menu or editor functionality.
Parametername: shortcut"
At line:1 char:52
+ $psISE.CurrentPowerShellTab.AddOnsMenu.Submenus.Add <<<< ("Test 1",{Write-host 'test 1'}, "CTRL+SHIFT+U")
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodTargetInvocation
Exception calling "Add" with "3" argument(s): "The menu 'Test 2' uses shortcut 'Ctrl+U', which is already in use by the menu or editor functionality.
Parametername: shortcut"
At line:2 char:52
+ $psISE.CurrentPowerShellTab.AddOnsMenu.Submenus.Add <<<< ("Test 2",{Write-host 'test 2'}, "CTRL+U")
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodTargetInvocation
屬於SuperUser? CTRL + U聽起來像撤消我,而CTRL + SHIFT + U聽起來像是可能的重做。 – tjameson 2011-05-27 05:12:42
在PowerShell ISE中無法撤消CTRL-Z – 2011-05-27 05:16:03
您在哪裏以及如何分配這些快捷方式? – 2011-05-27 05:29:06