- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 198
Disable Copilot keyboard shortcut (Windows key + C) #347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, Run these commands in command line: 1. PowerShell -ExecutionPolicy Unrestricted -Command "$keyToDisable='C'; $keyToDisableInUppercase = $keyToDisable.ToUpper(); $registryPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'; $propertyName = 'DisabledHotkeys'; $disabledKeys = Get-ItemProperty -Path $registryPath -Name $propertyName -ErrorAction SilentlyContinue | Select-Object -ExpandProperty "^""$propertyName"^""; if ($disabledKeys) {; if ($disabledKeys.Contains($keyToDisableInUppercase)) {; Write-Host "^""Skipping: Key `"^""$keyToDisableInUppercase`"^"" is already disabled. All disabled keys: `"^""$disabledKeys`"^"". No action needed."^""; exit 0; }; $newKeysToDisable = "^""$($disabledKeys)$($keyToDisableInUppercase)"^""; Write-Host "^""Some keys are already disabled: `"^""$disabledKeys`"^"", but not `"^""$keyToDisableInUppercase`"^"", disabling it too, new disabled keys: `"^""$newKeysToDisable`"^""."^""; try {; Set-ItemProperty -Path $registryPath -Name $propertyName -Value "^""$newKeysToDisable"^"" -Force -ErrorAction Stop; Write-Host "^""Successfully disabled,`"^""$keyToDisableInUppercase`"^"", all disabled keys: `"^""$newKeysToDisable`"^""."^""; Exit 0; } catch {; Write-Error "^""Failed to disable `"^""$newKeysToDisable`"^"": $_"^""; Exit 1; }; } else {; Write-Host "^""No keys has been disabled before, disabling: `"^""$keyToDisableInUppercase`"^""."^""; try {; Set-ItemProperty -Path $registryPath -Name $propertyName -Value "^""$keyToDisableInUppercase"^"" -Force -ErrorAction Stop; Write-Host "^""Successfully disabled,`"^""$keyToDisableInUppercase`"^""."^""; Exit 0; } catch {; Write-Error "^""Failed to disable `"^""$keyToDisableInUppercase`"^"": $_"^""; Exit 1; }; }" 2. (It will restart explorer, needed to activate it): taskkill /f /im explorer.exe & start explorer You can test directly after running this script and feel free to report if it worked, if it did not, try to restart your computer and test again. |
I ran the script from CMD and rebooted.
But the shortcut still works. |
Ok thanks for the feedback. The Copilot you're seeing is not a traditional "app" but an Edge process, making it harder to target it. The script I provided would work if it was Explorer/Taskbar that was handling Now you can revert disabling PowerShell -ExecutionPolicy Unrestricted -Command "$keyToRestore='C'; $keyToRestoreInUppercase = $keyToRestore.ToUpper(); $registryPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'; $propertyName = 'DisabledHotkeys'; $disabledKeys = Get-ItemProperty -Path $registryPath -Name $propertyName -ErrorAction SilentlyContinue | Select-Object -ExpandProperty "^""$propertyName"^""; if (-Not $disabledKeys) {; Write-Host "^""Skipping: No keys has been disabled before, no need to restore `"^""$keyToRestoreInUppercase`"^""."^""; Exit 0; }; if (-Not $disabledKeys.Contains($keyToRestoreInUppercase)) {; Write-Host "^""Skipping: Key `"^""$keyToRestoreInUppercase`"^"" is not disabled. All disabled keys: `"^""$disabledKeys`"^"". No action needed."^""; Exit 0; }; $newKeysToDisable = $disabledKeys.Replace($keyToRestoreInUppercase, "^"""^""); if (-Not $newKeysToDisable) {; Write-Host "^""Removing all entries from the disabled keys as the last key `"^""$keyToRestoreInUppercase`"^"" is being restored."^""; try {; Remove-ItemProperty -Path $registryPath -Name $propertyName -Force -ErrorAction Stop; Write-Host "^""Successfully removed the `"^""$propertyName`"^"" property from the registry, no disabled keys remain."^""; Exit 0; } catch {; Write-Error "^""Failed to remove the empty `"^""$propertyName`"^"" property from the registry: $_"^""; Exit 1; }; }; try {; Write-Host "^""Restoring `"^""$keyToRestoreInUppercase`"^"", all disabled keys: `"^""$disabledKeys`"^"", new disabled keys: `"^""$newKeysToDisable`"^""."^""; Set-ItemProperty -Path $registryPath -Name $propertyName -Value "^""$newKeysToDisable"^"" -Force -ErrorAction Stop; Write-Host "^""Successfully restored `"^""$keyToRestoreInUppercase`"^"", disabled keys now: `"^""$newKeysToDisable`"^""."^""; Exit 0; } catch {; Write-Error "^""Failed to restore `"^""$keysToDisable`"^"": $_"^""; Exit 1; }" Now that the OS is clean, I'll suggest trying three other methods. I. Limit edgeNow that your OS is clean. We can try to target Edge to limit its functionality to run Copilot and see if it works.
reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "WebWidgetAllowed" /t "REG_DWORD" /d "0" /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HubsSidebarEnabled" /t REG_DWORD /d "0" /f You can now restart your computer and test. If they do not work, you can restore your OS back to its defaults: reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "WebWidgetAllowed" /f 2>nul
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v "HubsSidebarEnabled" /f 2>nul II. Remove Edge AI appIf the above does not work, we can try this. This is an undocumented app released by Microsoft, and you might not have it. This code would remove it: PowerShell -ExecutionPolicy Unrestricted -Command "Get-AppxPackage 'Microsoft.Windows.Ai.Copilot.Provider' | Remove-AppxPackage" You should not have Copilot open when you run this. This will most likely do nothing, but you'd see it in cmd if it does something. III. Test GPO manuallyIf none of the above works, you can follow what @hhoneeyy reported in #335. And it's about manually running GPO. I do not understand how it can resolve the issue, this GPO is set by privacy.sexy anyway ( |
I've done I, II, and III, but the shortcut still launches the Copilot. |
My best shot was the first setting in my first comment. All other global Windows key shortcuts are handled by As you report that it does not work, Copilot seems to be a different case, deeply integrated in some another process. I cannot come up with more ideas, but I expect Microsoft to provide a documented setting for this to keep enterprises happy. I'm leaving this the community, there may be another solution in the wild that someone else knows. |
Run the above script.
Type
win + c
and the Copilot widget will appear on the right.The text was updated successfully, but these errors were encountered: