如何为 WebStorm 或 IntelliJ IDEA 使用 Mac OSX Windows 上的键盘映射?

How to use Mac OSX Keymap on Windows for WebStorm or IntelliJ IDEA?

出于工作目的,我在 Mac 和 Windows 上都使用 WebStorm。 我想知道是否可以在 Windows 上使用 MAC OSX 键盘映射。

在 windows 上,如果您加载 MAC OSX 键映射,则映射似乎没有正确对齐。例如,我看到正在使用字符 Meta,但是 Windows 似乎没有正确映射该字符。

我还想指出,我在 Windows PC 上使用 Mac 键盘。

Cmd (Meta) 键如何映射到您的 Windows 键?

您可以获得 full Mac keymap XML 文件并将 meta 替换为 Windows 上的任何键。某些键可能不起作用,或者您可能会遇到映射冲突。

没有开箱即用的简单直接的方法。

On Mac 键盘映射使用 AltCtrlMetaShift 修饰符。这不能直接映射到您在 Windows 上只有 3 个修饰符(AltCtrlShift).默认你can't use Win as the modifier

此外,Win 的许多组合已经被 OS 所采用(禁用这些默认映射的唯一方法是通过 registry modification).

欢迎您尝试 there is a workaroundWin 在 IntelliJ IDEA 中作为修饰符工作。

在 Windows 上转到 file > settings > keymap 并在 keymaps 下拉菜单中 select defaultmeta(又名 cmd) 密钥将被替换为 ctrl.

有第三方插件samvtrran that solve that: macOS For All

插件说明如下:

A keymap for Windows and Linux (and macOS if you really want!) that rebinds common macOS 10.5+ shortcuts to non-Command keys. Some shortcuts aren't 1:1 replacements of modifier keys, so please check the key updates table.

If you notice any conflicting shortcuts or have a suggestion for a new keybinding, please open an issue on GitHub.