键盘组合键映射

The Office Key is a new key that you’ll find on Microsoft keyboards. It lets you quickly launch apps like Word, but you can remap it with AutoHotkey to act as an extra modifier key or disable the app shortcuts altogether.

Office密钥是您可以在Microsoft键盘上找到的新密钥。 它可以让您快速启动Word之类的应用程序,但是您可以使用AutoHotkey重新映射它,以充当额外的修改键或完全禁用应用程序快捷方式。

什么是办公室钥匙? (What Is The Office Key?)

You’ll find this key on new Microsoft keyboards released after October 15th. You may have also heard of the dedicated emoji key Microsoft added along with it; both keys slot in where the right Windows key and menu key used to be, in between Right Alt and Right Control:

您会在10月15日之后发布的新Microsoft键盘上找到此键。 您可能还听说过Microsoft随它一起添加的专用表情符号键。 两个键都位于右Windows键和菜单键以前所在的位置,介于Right Alt和Right Control之间:

Out of the box, the Office key opens up the Office application and has several hotkeys to open up specific Microsoft apps. There are basic hotkeys like Office+W and Office+X to open Word and Excel, but also some more obscure ones—Office+L, Office+T, and Office+Y open up LinkedIn, Microsoft Teams, and Yammer.

开箱即用的Office密钥可打开Office应用程序,并具有几个热键可用于打开特定的Microsoft应用程序。 有一些基本的热键,例如Office + W和Office + X,可以打开Word和Excel,还有一些更晦涩的热键-Office + L,Office + T和Office + Y,可以打开LinkedIn,Microsoft Teams和Yammer。

Office键发送Shift + Control + Alt + Windows (The Office Key Sends Shift+Control+Alt+Windows)

This is convenient, but you might think that this is a new key Microsoft created, similar to the Windows key. But Microsoft cares about backward compatibility, and inventing a whole new key would be a hassle, so it took a shortcut.

这很方便,但是您可能会认为这是Microsoft创建的新密钥,类似于Windows密钥。 但是Microsoft关心向后兼容性,并且发明一个全新的密钥很麻烦,因此花了一条捷径。

You may have heard of the “hyper” key. Hyper was an old modifier key from way back when and was used on the Space-cadet keyboard for Lisp machines. It’s practically a fossil. You won’t find it on any modern keyboard, and it isn’t supported in any current OS. But the name is cool, and it stuck around as a term for an obscure modifier key that isn’t used by any applications.

您可能听说过“超级”键。 Hyper是从那时起的旧修改器键,并在Lisp机器的Space-cadet键盘上使用。 它实际上是化石。 您不会在任何现代键盘上找到它,并且当前任何操作系统均不支持它。 但是这个名字很酷,并且一直是任何应用程序都不会使用的晦涩修饰键的术语。

Nowadays, the Hyper key is emulated with a combination of every modifier key. On macOS, this maps to Shift+Control+Option+Command. On Windows, the Hyper key is emulated with Shift+Control+Alt+Windows.

如今,超级键已与每个修饰键的组合进行了模拟。 在macOS上,这映射到Shift + Control + Option + Command 。 在Windows上,使用Shift + Control + Alt + Windows模拟Hyper键。

The thought behind this mapping is that no UX designer is going to be crazy enough to design an application that requires a user to press all four modifier keys at once. This essentially gives you an entire keyboard worth of modifier keys for you to bind however you’d like, which is great.

这种映射背后的想法是,没有UX设计人员会疯狂到足以设计要求用户同时按下所有四个修饰键的应用程序。 从本质上讲,这为您提供了一个完整的键盘修饰键,供您随意绑定,这很棒。

Or, at least, it was—in Windows 10’s May 2019 update, Microsoft added preliminary OS support for the Office key before it was released to the public. Guess what the Office key maps to?

或者至少是-在Windows 10的2019年5月更新中 ,Microsoft在向公众发布Office密钥之前添加了对OS密钥的初步操作系统支持。 猜猜Office密钥映射到什么?

It’s Hyper. Rather than implementing a new key, the Office key acts as all four modifier keys. The emoji key isn’t really a key itself; it maps to the shortcut Office+Space, which you can press yourself to open the emoji viewer. (You can press Windows+. or Windows+; to open the emoji panel, too.)

超级。 Office密钥充当所有四个修改器密钥,而不是实现新的密钥。 表情符号键本身并不是真正的键; 它映射到快捷方式Office + Space,您可以按一下自己打开表情符号查看器。 (您也可以按Windows +。或Windows +;来打开表情符号面板 。)

Having a dedicated Hyper key on your keyboard would be great. Most people repurpose Caps Lock, but the Office key would replace the useless Right Windows key and turn it into something useful. Unfortunately, out of the 27 available letter keys and spacebar, 10 of them are in use by the Office key shortcuts, with the possibility of Microsoft adding more in the future. Currently, there’s no built-in way to turn off these shortcuts. There’s no option in Settings, no registry tweak, and no group policy.

在键盘上拥有专用的Hyper键会很棒。 大多数人重新设置了Caps Lock的用途,但是Office密钥将替换无用的Right Windows密钥并将其转变为有用的东西。 不幸的是,在27个可用的字母键和空格键中,Office快捷键正在使用其中的10个,微软将来可能会添加更多。 当前,没有内置方法可以关闭这些快捷方式。 “设置”中没有选项,没有注册表调整,也没有组策略。

Naturally, the fact that you can no longer press Hyper+Y without being taken to the marketing page for Yammer has made Hyper key users fairly upset. There are, however, a few tweaks you can do yourself to either remap the key or turn the shortcut off altogether. Before we get started with AutoHotkey, there is one registry tweak you’ll need to enable by running the following command in PowerShell. Right-click your Start button and click “PowerShell” to open it:

自然地,您不能再不按Yammer进入营销页面就不能按Hyper + Y的事实使Hyper关键用户相当不高兴。 但是,您可以做一些调整来重新映射键或完全关闭快捷键。 在我们开始使用AutoHotkey之前,您需要通过在PowerShell中运行以下命令来启用一项注册表调整。 右键单击“开始”按钮,然后单击“ PowerShell”将其打开:

REG ADD HKCU\Software\Classes\ms-officeapp\Shell\Open\Command /t REG_SZ /d rundll32

Usually, when you press the Office key on its own, it opens up the Office app. This modifies the location that gets opened, preventing the app from starting whenever the key is pressed. Unfortunately, there’s nothing similar we’ve found in the registry that would allow the app-specific hotkeys to be disabled, so you’ll need to remap those manually. If you find a way to disable the app-specific shortcuts from the registry, let us know in the comments, and we’ll update this article.

通常,当您单独按下Office键时,它将打开Office应用程序。 这将修改打开的位置,从而防止每当按键时启动应用程序。 不幸的是,在注册表中没有发现可以禁用特定于应用程序的热键的类似功能,因此您需要手动重新映射这些键。 如果您找到一种从注册表禁用特定于应用程序的快捷方式的方法,请在评论中告知我们,我们将更新本文。

如何使用AutoHotKey重新映射Office密钥 (How to Remap the Office Key With AutoHotKey)

AutoHotkey is a program for remapping keyboard keys to specific actions. It can do a lot more, but in this case, we really only want to use it to remove the Windows key from the Office key combinations.

AutoHotkey是一个程序,用于将键盘键重新映射为特定操作。 它可以做很多事情,但是在这种情况下,我们真的只想使用它从Office组合键中删除Windows键。

AutoHotkey installs a low-level keyboard hook that intercepts keyboard events before the rest of the system gets to them. If it matches a configured hotkey, the event is intercepted by AutoHotkey. AutoHotkey can then send its own modified keyboard events. This doesn’t allow you to send the Shift+Control+Alt+Win+W hotkey, however, as that will still trigger the Word shortcut. You can, however, send Shift+Control+Alt+W. That’s still unwieldy enough to be considered a Hyper key you wouldn’t normally press, although you’ll have to double-check to make sure your applications aren’t using it.

AutoHotkey安装了一个低级键盘钩子,该钩子会在系统其余部分进入键盘事件之前拦截它们。 如果它与配置的热键匹配,则该事件将被AutoHotkey拦截。 然后,AutoHotkey可以发送自己修改的键盘事件。 但是,这不允许您发送Shift+Control+Alt+Win+W热键,因为它仍然会触发Word快捷方式。 但是,您可以发送Shift+Control+Alt+W 尽管您必须仔细检查以确保您的应用程序没有使用它,但仍不足以被视为通常不会按的超级键。

The following script will remap Office+W to Shift+Control+Alt+W. Just save the text as an AutoHotKey script and run it:

以下脚本会将Office + W重新映射到Shift+Control+Alt+W 只需将文本另存为AutoHotKey脚本并运行即可 :

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#UseHook
#InstallKeybdHook
#SingleInstance force
SendMode Input
#^!+W::
Send ^!+W
return

The character sequence “#^!+” is AutoHotkey shorthand for Windows, Control, Alt, and Shift, respectively. This script matches Office+W and sends back the corrected sequence, which solves the issue of Word opening.

字符序列“ #^!+ ”分别是Windows,Control,Alt和Shift的AutoHotkey的缩写。 该脚本与Office + W匹配,并发送回更正的序列,从而解决了Word打开问题。

Of course, you’ll also need to remap the other keys, T, Y, O, P, D, L, X, N, and Space, so the full script is much longer:

当然,您还需要重新映射其他键T,Y,O,P,D,L,X,N和Space,因此完整脚本会更长:

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#UseHook
#InstallKeybdHook
#SingleInstance force
SendMode Input
#^!+W::
Send ^!+W
return
#^!+T::
Send ^!+T
return
#^!+Y::
Send ^!+Y
return
#^!+O::
Send ^!+O
return
#^!+P::
Send ^!+P
return
#^!+D::
Send ^!+D
return
#^!+L::
Send ^!+L
return
#^!+X::
Send ^!+X
return
#^!+N::
Send ^!+N
return
#^!+Space::
Send ^!+Space
return

You can use the corrected hotkeys for each of the ten keys the Office key uses, but you’ll be able to use the full Hyper key for each key that isn’t used. You can also map these hotkeys to AHK functions, so you have total freedom over them, provided you handle them in some way so that the Office app doesn’t open.

您可以为Office密钥使用的十个键中的每一个使用更正后的热键,但是您可以为未使用的每个键使用完整的超级键。 您还可以将这些热键映射到AHK功能,因此您可以完全自由地使用它们,只要您以某种方式处理它们就不会打开Office应用程序。

This solution is probably good enough for most people until Microsoft decides to allow this to be turned off (if ever). But, if you really want to disable the Office app shortcuts altogether, there is a hacky solution.

在Microsoft决定允许将此功能关闭之前(如果有的话),此解决方案对大多数人来说可能已经足够好。 但是,如果您确实要完全禁用Office应用程序快捷方式,则有一个解决方案。

如何完全删除Office密钥集成 (How to Remove Office Key Integrations Entirely)

Warning: The following is a bit of an ugly hack. This solution is really only for advanced users, so if you don’t know what you’re doing, stick to the AutoHotkey solution.

警告 :以下内容有些丑陋。 该解决方案实际上仅适用于高级用户,因此,如果您不知道自己在做什么,请坚持使用AutoHotkey解决方案。

But, if you want to use the Shift-Control-Alt-Win key combination as a Hyper key and wish Microsoft never added the Office hotkeys in the first place, there is a solution that solves the problem entirely.

但是,如果您想将Shift-Control-Alt-Win组合键用作超级键,并且希望Microsoft从不首先添加Office热键,那么有一种解决方案可以完全解决问题。

In Windows, system-wide hotkeys must be registered with the operating system using the RegisterHotKey system function. Under the hood, the Office Key hotkeys are registered this way by Explorer, the process that’s responsible for your desktop, taskbar, and File Explorer. It’s an integral part of Windows, so it makes sense to register hotkeys here; hotkeys created with RegisterHotKey will automatically deregister when the process that registered them closes. Since Explorer is always open, the hotkeys will be permanent.

在Windows中,必须使用RegisterHotKey系统功能向操作系统注册系统范围的热键。 在后台,Office密钥热键由资源管理器以这种方式注册,该过程负责您的桌面,任务栏和文件资源管理器。 它是Windows不可或缺的一部分,因此在此处注册热键很有意义。 使用RegisterHotKey创建的热键将在注册它们的进程关闭时自动注销。 由于资源管理器始终处于打开状态,因此热键将是永久性的。

Our first thought is to override the Office hotkeys by registering our own. But, if you create a program that runs RegisterHotKey, you’ll find that it won’t work. You can’t register hotkeys that have already been registered by another program.

我们首先想到的是通过注册我们自己的方法来覆盖Office热键。 但是,如果您创建一个运行RegisterHotKey的程序,则会发现它将无法工作。 您不能注册已经被另一个程序注册的热键。

However, when programs exit, they automatically deregister their hotkeys. This means if you can close the program that registered the hotkeys, you can disable them. Unfortunately, closing Explorer isn’t a very viable solution, as you’d be stuck without a usable computer. And if you restarted Explorer, it would reregister the hotkeys when it starts back up.

但是,程序退出时,它们会自动注销其热键。 这意味着,如果您可以关闭注册热键的程序,则可以禁用它们。 不幸的是,关闭资源管理器不是一个可行的解决方案,因为如果没有可用的计算机,您将陷入困境。 而且,如果您重新启动了Explorer,它将在启动备份时重新注册热键。

So this solution works like this: The Office-key fixing program closes Explorer, which frees up the hotkeys to be overwritten. It then registers each Office-key related hotkey we want to disable and restarts Explorer. When Explorer starts back up, it tries to register the Office key hotkeys like normal but is blocked because our program already registered them. It only tries to do this on startup, so all we have to do is wait a few seconds and then exit the program. This deregisters the hotkeys in the process, which allows them to be used by other programs.

因此,此解决方案的工作方式如下:Office密钥修复程序将关闭资源管理器,这将释放要覆盖的热键。 然后,它注册我们要禁用的每个与Office密钥相关的热键,然后重新启动资源管理器。 当资源管理器启动后,它将尝试像正常一样注册Office按键热键,但是由于我们的程序已经注册了它们而被阻止。 它仅尝试在启动时执行此操作,因此我们要做的就是等待几秒钟,然后退出程序。 这会在过程中注销热键,从而使它们可以被其他程序使用。

This solution works perfectly, and allows the actual Office key or emulated Hyper key to use every shortcut on the keyboard with no risk of opening random Microsoft apps. It cuts off the Office key hotkeys entirely. Explorer doesn’t even get sent a message when you press these key combinations.

该解决方案运行完美,并允许实际的Office键或模拟的Hyper键使用键盘上的每个快捷键,而无需打开随机Microsoft应用程序的风险。 它完全切断了Office快捷键。 按下这些组合键时,Explorer甚至都不会收到消息。

The only downside is that because we’re restarting explorer, when this program runs on startup, it will flash the desktop black for a split second before restarting. It’s not super intrusive, but it’s enough to notice. If your PC takes a second to load the startup apps, it will close any File Explorer windows you have open. The upside is that you can rest easy knowing that you’re 1-0 in the fight against Microsoft’s marketing department for control of your keyboard.

唯一的缺点是,因为我们要重新启动资源管理器,所以当该程序在启动时运行时,它将在重新启动之前将桌面黑色闪烁一秒钟。 它不是超级侵入式的,但足以引起注意。 如果您的PC需要一秒钟时间来加载启动应用程序,它将关闭您打开的所有File Explorer窗口。 好处是,您可以轻松地知道自己在与Microsoft市场营销部门的键盘控制斗争中处于1-0状态。

Anyway, the script is a relatively short bit of C++:

无论如何,该脚本是相对较短的C ++:

#include <windows.h>
#include <stdio.h>
#include <thread>
#include <chrono>
#include <iostream>
int main(int argc, wchar_t* argv[])
{
//Build Array Of Keys To Unregister
//These map to W, T, Y, O, P, D, L, X, N, and Space, respectively.
UINT offendingKeys[10] = { 0x57, 0x54, 0x59, 0x4F, 0x50, 0x44, 0x4C, 0x58, 0x4E, 0x20 };
//Kill Explorer
system("taskkill /IM explorer.exe /F");
//Register hotkey
for (int i = 0; i < 10; i++) {
RegisterHotKey(NULL, i, 0x1 + 0x2 + 0x4 + 0x8 | MOD_NOREPEAT, offendingKeys[i]);
}
//Restart Explorer
system("start C:/Windows/explorer.exe");
/* Sleep for a few seconds to make sure Explorer has time to
attempt to register the Office hotkeys, and get blocked by
our hotkeys */
std::this_thread::sleep_for(std::chrono::milliseconds(4000));
//deregister hotkeys by ID
for (int i = 0; i < 10; i++) {
UnregisterHotKey(NULL, i);
}
return 1;
}

You can also find it here on GitHub. You’ll have to compile it yourself, but you shouldn’t really be running random executables you find on the internet, anyway. Once you have it as a binary, place it in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup so it will run after your computer boots.

您也可以在GitHub上找到它。 您必须自己进行编译 ,但是无论如何,您实际上都不应该运行在Internet上找到的随机可执行文件。 将其作为二进制文件保存后,将其放在C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup以便它将在计算机启动后运行。

Executables placed in the startup folder take a bit to open, so the program will probably run 5-10 seconds after you see the desktop. It will close out any File Explorer windows you have open, but won’t close down other applications like Chrome.

放置在启动文件夹中的可执行文件需要一点时间才能打开,因此该程序可能会在您看到桌面后5-10秒钟运行。 它将关闭您打开的所有文件浏览器窗口,但不会关闭其他应用程序,例如Chrome。

If anyone reading this knows of a way to prevent Explorer from registering the hotkeys without restarting it—or if it’s somehow possible to deregister hotkeys created by another thread—feel free to let us know in the comments.

如果读过这篇文章的人知道一种防止Explorer在不重新启动的情况下注册热键的方法,或者是否有可能注销由另一个线程创建的热键的方法,请随时在注释中告知我们。

翻译自: https://www.howtogeek.com/445318/how-to-remap-the-office-key-on-your-keyboard/

键盘组合键映射

键盘组合键映射_如何在键盘上重新映射Office键相关推荐

  1. java键盘监听延迟_解决JAVA键盘监听的延迟现象以及八个方向的运动

    首先解释一下键盘出现延迟的原因: 其实键盘为了用户体验,在按下一次按键之后,会有片刻的延迟,为什么会这样呢? 你想一下,当你打一个字母时,连着出来了好几个字母,你心里面的感受是怎么样的? 所以嘛,键盘 ...

  2. 使用集合映射和关联关系映射_使用R进行基因ID映射

    使用集合映射和关联关系映射 Inter-conversion of gene ID's is the most important aspect enabling genomic and proteo ...

  3. java upnp 端口映射_路由器 UPnP设置与端口映射操作步骤合集 几种常用猫设置

    该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 所列如没你需要的猫,可留言 实达_ADSL_2110EH 详细端口映射的设置 假设内网IP为:192.168.10.2 在IE中用http://192.1 ...

  4. rk键盘快捷键快捷键不一致_为什么其他键盘语言的键盘快捷键和可访问性很少起作用...

    rk键盘快捷键快捷键不一致 Using keyboard shortcuts are important both if you have accessibility problems but als ...

  5. 键盘定位板图纸_聊聊机械键盘的结构

    很多人觉得客制化机械键盘都有着风格迥异的设计,但它们的结构都是互通的,万变不离其宗.这篇文章就粗略的讲一下机械键盘的结构与特殊设计. 客制化键盘的结构分Case mount和Tray mount两大类 ...

  6. 键盘定位板图纸_聊聊机械键盘的结构。

    很多人觉得客制化机械键盘都有这风格迥异的设计,但它们的结构都是互通的,万变不离其宗.这篇文章就粗略的讲一下机械键盘的结构与特殊设计. 客制化键盘的结构分Case mount和Tray mount两大类 ...

  7. mysql 1433端口映射_常见路由器的1433端口映射讲解

    实现异地远程连接,服务器电脑如果是通过ADSL+路由器的方式上网,就需要在服务器电脑对路由器中进行相应的端口映射的设置.设置的方法可能会因为路由器不同的品牌和型号,在设置的方法上也会有所不同.我们收集 ...

  8. python中字典添加键对_关于python:如何向字典添加键、值对?

    本问题已经有最佳答案,请猛点这里访问. 如何在字典中添加键.值对?.下面我提到了以下格式? {'1_somemessage': [[3L, 1L, u'AAA', 1689544L, datetime ...

  9. Mysql从库主键卡住_从库宕机引发的主键冲突

    刚刚接到报警短信,从库宕机,马上通知机房重启,在检查MySQL时,发现同步挂了,报主键冲突,询问开发是不是有往里面写数据,回答没有.这就奇怪了,怎么会无缘 刚刚接到报警短信,从库宕机,马上通知机房重启 ...

最新文章

  1. 看完这篇还不懂Redis的RDB持久化,你们来打我!
  2. 卡巴斯基工业基础设施专用网络安全解决方案
  3. 2.2 清除标注错误的数据-深度学习第三课《结构化机器学习项目》-Stanford吴恩达教授
  4. 博客搜索引擎索引博文数量分析与评估
  5. bs4爬取的时候有两个标签相同_10分钟用Python爬取最近很火的复联4影评
  6. 5g上行速率怎么提升_揭秘联发科5G独家技术,攻克上行覆盖和终端功耗两大技术难题...
  7. 摄影测量--相对定向-绝对定向(C++实现)
  8. python xml.dom模块解析xml
  9. 深度解析~iOS应用程序~生命周期
  10. Simple Mail Transfer Protocol --- SMTP协议
  11. 精密单点定位/PPP软件GAMP学习之一
  12. python UI自动化无界面运行
  13. Linux系统中,让alias命令永久保存的方法!
  14. html5图片漂浮代码,QQ空间免费漂浮代码怎么搞啊
  15. 【批处理DOS-CMD命令-汇总和小结】-注册表编辑命令reg,如何用cmd命令打开注册表编辑器regedit
  16. 晨哥真有料丨女生最难忍受这3件事!
  17. 【写博客常用】sql server 登陆服务器名称是什么
  18. C ++程序将给定的英寸转换为等效的码,英尺和英寸
  19. tomcat启动异常:子容器启动失败(a child container failed during start)
  20. (转)流量加速插件 FinalSpeed介绍及一键安装教程

热门文章

  1. 服务器自检后显示scsi,SCSI RAID卡常见故障分析及BIOS升级指导
  2. 比尔·盖茨的分布式爱情
  3. 图像边缘锯齿及处理方法
  4. Vue 中select option默认选中的处理方法
  5. 【R】【密度聚类、层次聚类、期望最大化聚类】
  6. HTML 表单-表单域
  7. echarts风向图
  8. FFmpeg4入门07:解码视频并保存为YUV格式文件
  9. SQL Server 2012 联机丛书
  10. vba 字符串换行的几种方法