I am trying to assign
- CTRL+U
- CTRL+SHIFT+U
to some PowerShell ISE Addonmenu functions, but say seem to be assigned to some Windows function.
I didn't find them in current online shortcut lists either or are there some applications which can create global shortcuts which are used even when other application have the focus?
Edit:
I changed the title, after recognizing, that this is a PowerShell ISE problem and no general Windows problem.
and here is the code
$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