This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
The community reviewed whether to reopen this question 2 years ago and left it closed:
Original close reason(s) were not resolved
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(6)
使用 KeyRemap4MacBook (Karabiner 适用于 osx 10.9、10.10)。 正如 Mecki 指出的,XML .keylayouts / Ukelele 无法解决您的问题。
尽管名称如此,KeyRemap4MacBook 可在任何 Mac(OS X 10.4 或更高版本)上运行。
您想要的设置位于“对于 PC 用户”»“更改 PC 应用程序密钥”。
Use KeyRemap4MacBook (Karabiner for osx 10.9, 10.10). As Mecki pointed out, XML .keylayouts / Ukelele can't solve your problem.
In spite of the name, KeyRemap4MacBook works on any Mac (OS X 10.4 or later).
The settings you want are under "For PC Users" » "Change PC Application Key".
使用KeyRemap4Macbook。 像这样编辑
private.xml
文件:此代码会将右选项键重新映射到上下文菜单键。
Use
KeyRemap4Macbook
. Editprivate.xml
file like this:This code will remap right option key to the context menu key.
最新的 MacOS 版本由 Karabiner Elements 12.1 提供服务。
键到键的重新映射是在“简单修改”选项卡中完成的,并可以在 2 行下拉菜单中方便地选择(参见:屏幕截图)。
此首选项面板选项卡中的
复杂修改
必须通过从互联网(Karabiner-E. 站点)或用户的~/.config/karabiner/assets/ 导入来添加Complex_modifications
文件夹。来自网络的“复杂”实际上也被复制到那里并在选项卡中“打开”(=
[+ Enable]
)。所有修改最终都存储(并因此“激活”)在
~/.config/karabiner/karabiner.json
中。一个务实的程序(这也有助于避免自己编写复杂模块时出现错误)是复制并复制它。 重命名& 改变一个“导入的”模组。
一旦您有经验(例如:不同的括号类型),直接编辑 json 文件可能会更容易......
不再像其他一些功能那样限制重新映射到特定窗口(可以通过 osascript AppleScript 模拟)。
Karabiner 的非 Element 版本正在开发中。
两个获取信息和信息的网站 问题(已回答) - 但请搜索以前的“双打”!:
github.com >> ; Karabiner-Elements
groups.google.com/forums/osx-karabiner
The latest MacOS versions are served by Karabiner Elements 12.1.
Key-to-key remapping are done in the
Simple Modifications
tab and conveniently selected in 2 rows of drop-down-menus (see: screenshot).Complex Modifications
in this Preferences Panel's tab have either to be added by importing them from the internet (Karabiner-E.'s site) or from the user's~/.config/karabiner/assets/ complex_modifications
folder."Complex" ones from the net actually are also copied there and switched "on" (=
[+ Enable]
) in the tab.ALL modifications are finally stored (& thus "activated") in
~/.config/karabiner/karabiner.json
.A pragmatic procedure (that also helps avoid mistakes while writing complex-mods yourself) is to copy & rename & alter one "imported" mod.
Once you are experienced (e.g.: different bracket types) it may be easier to edit the json file directly…
There is no longer the option to constrict remaps to specific windows (can be simulated by an osascript AppleScript) as some other features.
A non-Element version of Karabiner is being developed.
Two sites to get information & questions (answered) – but please search for previous "doubles" !:
github.com >> Karabiner-Elements
groups.google.com/forums/ osx-karabiner
您可以使用 Karabiner 将 App 映射到 Command+Option:
然后您可以使用 Keyboard Maestro 映射 Command+Option+Letter,其中 Letter< /kbd> 是表示应用程序的键,用于聚焦应用程序:
例如,您可以执行 < kbd>App+C 聚焦 Chrome,App+T 聚焦终端,App+ S 聚焦 Slack 等(如果应用程序尚未打开,Keyboard Maestro 首先打开它)。
如果您使用通用键盘,则您有一个专用的应用程序密钥:
如果您使用的是 Apple 键盘,则必须按住 Command 和 Option,但它们彼此相邻,并出现在空格键的两侧:
请记住,OS X 已经使用 Command+Option+ Esc 打开强制退出应用程序对话框,因此您现在可以使用 App+Esc 来执行此操作。 同样,OS X 使用 Command+Option+W 关闭焦点应用程序中的所有窗口(Chrome 中的选项卡)。
注意:
You can use Karabiner to map App to Command+Option:
You can then use Keyboard Maestro to map Command+Option+Letter, where Letter is a key that denotes an application, to focus the application:
For example, you can then do App+C to focus Chrome, App+T to focus Terminal, App+S to focus Slack etc. (if an app isn't already open, Keyboard Maestro opens it first).
If you're using a generic keyboard, then you have a dedicated App key:
If you're using an Apple keyboard, you have to hold Command and Option, but they are next to each other, and appear on both sides of the spacebar:
Keep in mind that OS X already uses Command+Option+Esc to open the Force Quit Applications dialogue, so you could now use App+Esc for that. Likewise, OS X uses Command+Option+W to close all of the windows in the focus application (tabs in Chrome).
Notes:
KeyRemap4MacBook
条目:适用于 PC 用户 -> 更改 PC 应用程序密钥 -> Option_L 的应用程序密钥
KeyRemap4MacBook
Entry: For PC Users -> Change PC Application Key -> Application Key to Option_L
不幸的是,最新的 macOS Sierra 尚不支持 Karabiner。 一个简单的解决方案是将
capslock
键转换为command
键。Unfortunately the latest macOS Sierra doesn't support Karabiner yet. An easy solution is to convert
capslock
key withcommand
key.