Category filter

Script to turn off keyboard shortcuts on Windows

Keyboard shortcuts are a convenient way to perform various actions quickly on devices. However, there may be situations where you want to turn off specific keyboard shortcuts based on your needs. In this document, we will explore scripts that allow you to disable or enable keyboard shortcuts across Windows devices and the Microsoft Edge app installed.

Whether you want to temporarily disable certain shortcuts or enable them, the scripts provide a flexible solution. Use Hexnode’s Execute Custom Script feature to remotely deploy these scripts to multiple devices in no time.

Disclaimer:


The sample scripts provided below are adapted from third-party open-source sites.

PowerShell script to manage keyboard shortcuts on Windows

Disable keyboard shortcuts

The following keyboard shortcuts are disabled on Windows after executing the above script.

Shortcut key Function
Windows key + A Open Quick Settings
Windows key + Ctrl + F Search for PCs (if you’re on a network)
Windows key + E Open File Explorer
Windows key + H Launch voice typing
Windows key + Pause/Break Open system information
Windows key + R Open the Run dialog box
Windows key + S Open search
Windows key + Shift + S Capture a screenshot of part of your screen
Windows key + T Cycle through apps on the taskbar
Windows key + V Open the clipboard history
Windows key + X Open the Quick Link menu
Windows key + Alt + R Record video of the active game window (using Xbox Game Bar)
Windows key + Shift + V Set focus to a notification
Windows key + number Open the desktop and launch the app pinned to the taskbar in the specified position indicated by ‘number’. If the app is already running, switch to that app.
Windows key + Shift + number Open the desktop and initiate a new instance of the app pinned to the taskbar at the position indicated by ‘number’.

Enable keyboard shortcuts

Use the below script to enable all keyboard shortcuts on your devices.

Notes:


After successfully executing the script, it is necessary to restart the device for the keyboard shortcuts to take effect.

PowerShell script to manage keyboard shortcuts on the Edge browser

Disable keyboard shortcuts on Microsoft Edge

The keyboard shortcuts given in the table are disabled on Microsoft Edge after executing the above script.

Shortcut key Function
CTRL + E or CTRL + K Open search query in the address bar
CTRL + O Open a file from your computer in Edge
CTRL + P Print the current web page
CTRL + S Save the current web page
CTRL + SHIFT + I Open Developer Tools
CTRL + SHIFT + K Duplicate the current tab
CTRL + SHIFT + M Sign in as a different user or browse as a Guest
CTRL + SHIFT + N Open a new InPrivate window
CTRL + SHIFT + S Save the current webpage as a screenshot
CTRL + SHIFT + Y Open Collections
ALT + HOME Open your homepage in the current tab
ALT + E Open the Edge browser menu

Enable keyboard shortcuts on Microsoft Edge

The below script enables all keyboard shortcuts on the Microsoft Edge browser.

Notes:

  • After executing the script, it is necessary to restart the Microsoft Edge application to ensure that the changes take effect.
  • The scripts will be effective for every user account that is currently logged in.
  • The scripts will fail if there is no logged-in user on the device during execution.
  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository