对于大多数人来说,Windows键是一个有用的快捷方式。但对一些人来说,这很令人沮丧。幸运的是,有很多方法可以禁用Windows键。从AutoHotkey(AutoHotkey)等第三方工具到操作系统的内置设置,我们将介绍禁用计算机上Windows键的所有最佳方法。
无论您是游戏中途不小心一直点击Window键的游戏玩家,还是想要更好地使用方便放置的按钮的高级用户,这只是您的指南。
使用AHK禁用或重新映射Windows 键(Windows Key)
AutoHotkey是最知名和最强大的工具之一,用于修改键盘(或鼠标)上任何键的功能。它是轻量级的,使用的系统资源可以忽略不计,而且非常易于使用。
这使其成为与其他应用程序一起使用的绝佳选择,因为它不会干扰它们的功能。许多游戏玩家使用AHK来实现自定义热键,而不会出现任何性能延迟。
您可以使用AHK做两件事。您可以完全禁用 Windows 键,也可以将不同的功能重新映射到该键。
- 首先,从官方网站下载 AutoHotkey 。(download AutoHotkey)
- 运行小安装文件以在您的计算机上安装AHK 。
- 前往计算机上的任何目录,然后右键单击空白区域。在出现的菜单中,前往New > AutoHotkey Script。
- 将其命名为您喜欢的任何名称,然后按Enter。右键单击此文件并选择Edit script。
- 不用担心,您不必编写一些深奥的代码。只需(Just)清除所有内容并输入以下内容:
LWin:: 返回(LWin:: Return)
- 保存文件并退出后,您可以立即开始使用该脚本。只需(Simply)双击脚本,Windows键就会被禁用。要再次启用它,请右键单击AHK系统托盘图标并选择退出。(Exit.)
如果您想将Windows键重新映射到其他东西,而不是禁用它,您只需将脚本中的Return替换为您想要的键即可。(Return)例如,您可以通过以下方式重新映射Windows键以用作Enter键:
LWin::输入(LWin::Enter)
您还可以访问键盘和鼠标上每个按钮的所有键码的完整列表。(a complete list of all the keycodes)
使用组策略编辑器(Group Policy Editor)禁用Windows 键(Windows Key)
本地组策略编辑器(The Local Group Policy Editor)是一种高级工具,允许管理员修改同一网络上多个用户或计算机的设置。其中一项设置包括关闭Windows键热键。
即使该工具用于管理计算机网络,您也可以使用它来指定单台计算机的设置。
注意:(Note: )如果您使用的是Windows家庭(Home)版,则此方法不适合您。组策略编辑器(Group Policy Editor)仅包含在Windows的(Windows)专业版(Pro)和企业(Enterprise)版中。
- 要访问组策略编辑器(Group Policy Editor),请在搜索栏中键入gpedit.msc并按Enter。
- 本地组策略编辑器(Local Group Policy Editor)将在新窗口中打开。左侧窗格中是您可以访问的所有设置类别。导航到管理模板(Navigate to Administrative Templates)> Windows 组件(Windows Components)>文件资源管理器。(File Explorer.)
- 您将在右侧窗格(Pane)中看到设置列表。向下滚动(Scroll),直到找到关闭 Windows 键热键(Turn off Windows Key hotkeys)选项,然后双击它。
- 在这个新窗口中,将单选按钮切换为已启用(Enabled),然后选择确定(OK )以保存更改。
就是这样。此计算机上的每个(Every)用户都将无法再使用Windows 密钥(Windows Key)。您始终可以使用相同的过程再次启用它。
使用注册表编辑器(Registry Editor)停用Windows 键(Windows Key)
禁用 Windows 密钥的最“永久”方式是修改计算机的注册表。与AHK不同,无需重复启用任何内容。与组策略编辑器(Group Policy Editor)不同,它也适用于Windows Home。话虽如此,修改您的注册表并不是一个可以轻易尝试的操作。
注册表是操作系统本身用来存储基本设置的数据库。乱用这些记录可能会破坏您的系统并造成严重问题。
如果您仍想继续使用此方法,请先备份您的注册表(backup your registry)。这样,即使您犯了严重错误,您也可以随时使用备份将您的计算机恢复正常。
- 在搜索框中输入regedit ,然后按(regedit)Enter打开注册表编辑器。
- 在注册表编辑器(Registry Editor)中,您可以在左侧窗格中查看“键”(将它们视为类别),并在右侧查看存储在其中的值。
- 通过单击类别或在顶部的地址栏中输入它,导航到HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
- 右键单击(Right-click)右侧面板中空白区域的任意位置,然后选择新建(New )> DWORD(32 位)值。(DWORD (32-bit) Value.)
- 将此键命名为 NoWinKeys(NoWinKeys)。确保它拼写正确,否则操作系统不会承认它。
- 双击(Double)您刚刚创建的DWORD并将其值设置为1。选择确定(OK)以保存它。
重新启动计算机并禁用Windows(Windows)键后,更改将生效。如果要再次启用它,只需删除NoWinKey DWORD。
使用 SharpKeys(Windows Key Using SharpKeys)禁用或重新映射Windows 键
有许多第三方实用程序可以重新映射或禁用键盘的任何键。问题是,这些应用程序中的大多数都是小型爱好项目或具有隐藏源代码的专有产品。由于您将使用此应用程序来更改系统的核心方面,因此您需要一些更值得信赖的东西。
SharpKeys是一个免费的开源软件,用于禁用或重新映射键盘键。将其视为 AutoHotkey(AutoHotkey)的GUI版本。它唯一的缺点是它直接修改Windows注册表,进行永久性更改。因此,您可能需要在使用它之前进行注册表备份。
- 从其 GitHub 页面(its GitHub page)下载 SharpKeys 。MSI文件将其安装到您的计算机上,而 zip 是不需要安装的便携式版本。抓住(Grab)你喜欢的任何一个。
- 安装(或解压)文件后,运行SharpKeys。您将看到这样的屏幕。
- 选择添加(Add)以打开添加新键映射(Add New Key Mapping )窗口。左窗格是您要禁用(或重新映射)的键,右窗格是您要替换它的功能。
- 要快速找到正确的键,请单击左窗格下方的键入键,然后按键盘上的(Type Key)Windows键。SharpKeys将检测按键。选择确定(OK)继续。
- 右窗格已经选择了Turn Key Off选项。如果您想重新映射Windows键,则可以从此列表中选择另一个键。完成后,选择确定。(OK.)
- 我们回到主屏幕,但表格中有一个新条目。如果您随着时间的推移重新映射多个键,则会在此处跟踪它们。确认您选择了正确的键,然后单击写入注册表(Write to Registry)以进行正式更改。
与手动编辑注册表一样,您需要重新启动计算机以应用更改。如果将来您希望撤消此过程,只需再次打开SharpKeys并删除(Delete)重新映射。再次选择写入注册表(Write to Registry)并重新启动以使其生效。
禁用 Windows 键
虽然上述每种方法都可以完成工作,但AHK 是禁用 Windows 键的最佳方法(AHK is the best way to disable the Windows key)。这是因为AHK是少数不修改注册表的第三方工具之一,并且可以轻松地打开和关闭。
组策略编辑器(Group Policy Editor)导航有点棘手,并且不适用于所有版本的Windows。AHK可以在任何地方工作,而且比仅仅禁用Windows键更灵活。您可以使用AHK更改Windows键的功能,甚至为其分配您自己的热键。
因此,如果您想禁用(或重新映射)键盘上的任何键,AutoHotkey是您的最佳选择。
How to Disable the Windows Key
The Windows key is a useful shortcut for most. But for some, it’s frustrating. Fortunately, therе are many ways of dіsabling the Windоws key. From third-party tools like AutoHotkey to the built-in settings of your operating system, we will go over all the best ways to disable the Windоws key on your computer.
Whether you’re a gamer who accidentally keeps tapping the Window key midgame or a power user who wants to make better use of the conveniently placed button, this is just the guide for you.
Disabling or Remapping the Windows Key with AHK
AutoHotkey is one of the most well-known and robust tools for modifying the function of any key on your keyboard (or the mouse, for that matter). It’s lightweight, uses negligible system resources, and is quite easy to use.
This makes it a great choice for using alongside other applications as it does not interfere with their functioning. Many gamers use AHK to implement custom hotkeys without any performance lag whatsoever.
There are two things you can do with AHK. You can either disable your Windows key entirely, or you can remap a different function to the key.
- To begin, download AutoHotkey from the official site.
- Run the small setup file to install AHK on your computer.
- Head to any directory on your computer and right-click on the empty space. In the menu that appears, head to New > AutoHotkey Script.
- Name it anything you like and press Enter. Right-click on this file and select Edit script.
- Don’t worry, you don’t have to write some esoteric code. Just clear everything and enter the following:
LWin:: Return
- Once you save the file and exit, you can start using the script right away. Simply double-click on the script and the Windows key will be disabled. To enable it again, right-click on the AHK system tray icon and select Exit.
Instead of disabling it, if you want to remap the Windows key to something else, you just need to replace the Return in the script with the key you want instead. For example, this is how you can remap the Windows key to function as the Enter key:
LWin::Enter
You also have access to a complete list of all the keycodes for every button on your keyboard and mouse.
Disabling the Windows Key with the Group Policy Editor
The Local Group Policy Editor is an advanced tool that allows an administrator to modify settings for multiple users or computers on the same network. One of these settings includes turning off the Windows key hotkey.
Even though the tool is meant for managing a network of computers, you can also use it for specifying settings for a single computer too.
Note: If you’re using the Home edition of Windows, this method will not work for you. The Group Policy Editor is only included in the Pro and Enterprise editions of Windows.
- To access the Group Policy Editor, type gpedit.msc in the search bar and press Enter.
- The Local Group Policy Editor will open in a new window. On the left pane are all the setting categories you can access. Navigate to Administrative Templates > Windows Components > File Explorer.
- You will see a list of settings in the right Pane. Scroll down until you find the Turn off Windows Key hotkeys option and then double click on it.
- In this new window, toggle the radio button to Enabled and then select OK to save the changes.
And that’s it. Every user on this computer will not be able to use the Windows Key anymore. You can always enable it again using this same process.
Deactivating the Windows Key with the Registry Editor
The most “permanent” way of disabling your Windows key is to modify your computer’s registry. Unlike AHK, there’s no need to repeatedly enable anything. And unlike the Group Policy Editor, it works on Windows Home as well. That being said, modifying your registry is not an action to be attempted lightly.
The registry is a database used by your operating system itself to store fundamental settings. Messing around with these records can destabilize your system and create serious issues.
If you still want to proceed with this method, backup your registry first. That way, even if you make a critical mistake you can always use the backup to restore your computer to normal.
- Enter regedit in the search box and press Enter to open the Registry Editor.
- In the Registry Editor, you can view the “keys” (consider them categories) on the left pane, and the values stored in them on the right.
- Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer by clicking through the categories or just entering it in the address bar at the top.
- Right-click anywhere on the empty space in the right panel and select New > DWORD (32-bit) Value.
- Name this key NoWinKeys. Make sure that it is spelled correctly as the operating system would otherwise not acknowledge it.
- Double click on the DWORD you just created and set its value to 1. Select OK to save it.
The changes will take effect once you restart your computer, disabling the Windows key. If you want to enable it again, just delete the NoWinKey DWORD.
Disabling or Remapping the Windows Key Using SharpKeys
There are many third-party utilities that can remap or disable any keys of your keyboard. The problem is, most of these applications are small hobby projects or proprietary products with hidden source code. Since you’ll be using this app to make changes to core aspects of your system, you need something more trustworthy.
SharpKeys is a free and open-source software for disabling or remapping keyboard keys. Consider it a GUI version of AutoHotkey. Its only drawback is that it directly modifies the Windows registry, making permanent changes. Therefore you may want to take a registry backup before using it.
- Download SharpKeys from its GitHub page. The MSI file installs it to your computer, while the zip is a portable version that doesn’t need to be installed. Grab whichever one you like.
- After installing (or extracting) the file, run SharpKeys. You will be greeted with a screen like this.
- Select Add to bring up the Add New Key Mapping window. The left pane is for the key you want to disable (or remap), and the right pane is the function you want to replace it with.
- To find the correct key quickly, click on Type Key below the left pane and press the Windows key on your keyboard. SharpKeys will detect the keypress. Select OK to continue.
- The right pane already has the Turn Key Off option selected. If you want to remap the Windows key instead, you can choose another key from this list. Once you’re done, select OK.
- We are back to the main screen, but with a new entry in the table. If you remap multiple keys over time, this is where they will all be tracked. Confirm that you selected the right keys, and click on Write to Registry to make the change official.
Like with manually editing your registry, you need to restart your computer to apply the change. If at any time in the future you wish to undo this process, just open SharpKeys again and Delete the remapping. Once again, select Write to Registry and restart to see it take effect.
Disabling the Windows Key
While each of the methods outlined above will get the job done, AHK is the best way to disable the Windows key. This is because AHK is one of the few third-party tools that does not modify the registry, and can be easily toggled on and off.
The Group Policy Editor is a bit trickier to navigate and doesn’t work on all versions of Windows. AHK works everywhere, and moreover, gives you much more flexibility than just disabling the Windows key. You can use AHK to change what the Windows key does, and even assign your own hotkeys to it.
So if you want to disable (or remap) any key on your keyboard, AutoHotkey is the way to go.