How to access mnemonics in Intellij 2017+ on Mac?

假装没事ソ 提交于 2021-02-06 12:44:46

问题


There is some evidence in the Intellij codebase they support ALT(/Meta)+CTL - (mnemonic) in Mac.

E.g: in platform/platform-api/src/com/intellij/openapi/MnemonicWrapper.java

  if (SystemInfo.isMac && Registry.is("ide.mac.alt.mnemonic.without.ctrl")) {

And the corresponding resource value in ./platform/util/resources/misc/registry.properties is set to true :

ide.mac.alt.mnemonic.without.ctrl=true

However pressing those two modifier keys together with .. say .. F (for File in the main menu) does not work for me on Sierra with the latest 2017.1 intellij.

Is this supposed to work? Is there any other way to get mnemonics working on Mac.

Note: please do not comment/respond "mnemonics are not encouraged/supported on mac". I am more than well aware of this terrible shortcoming on OS/X. However in previous versions of Intellij it has been possible to use mnemonics on Mac: and it would be a big boost to have them working again.

Update A YouTrack issue was requested by the Intellij Jetbrains support lead. It is here https://youtrack.jetbrains.com/issue/IDEA-175624

CTRL-ALT-(Mnemonic) DOES work.

The JetBrains lead Serge Baranov also mentioned that ALT-(Mnenomic) is supposed to work. It did not / does not for any of my laptops on 2017.X.

The Jetbrains support team led by Serge Baranov worked diligently on this - but were unable to reproduce. I expressed surprise since a half dozen installations on my side - all do not work. Apparently for their testing team it does work. One of my Mac's was factory new in June 2017 with Sierra and I installed IJ Ultimate 2017.1 without any changes from defaults. It did not work.

It is unclear what conditions were required for the Alt-Mnemonics to work on 2017.X.

* Another update* . Jetbrains has provided a fix for this: see last answer.


回答1:


Make sure mnemonics are not disabled in IntelliJ IDEA settings:

By default mnemonics should work with Ctrl+Alt and Alt on Mac.

If you prefer only Ctrl+Alt, add -Dide.mac.alt.mnemonic.without.ctrl=false in Help | Edit Custom VM Options (Processes Alt-based shortcuts for mnemonics in addition to Ctrl+Alt-based shortcuts. Affect MacOS only.)

There is also a bug in IntelliJ IDEA 2017.1.x versions which causes mnemonics to work via Alt in dialogs, but not in the menu. Adding -Dide.mnemonic.helper.old=true in Help | Edit Custom VM Options will workaround this issue. The fix will be available in 2017.2.x.




回答2:


Thanks to Serge Baranov of JetBrains : we now have a solution

Add the following to Custom VM Options

-Dide.mnemonic.helper.old=true

In addition a fix will be added to 2017.2



来源:https://stackoverflow.com/questions/44542792/how-to-access-mnemonics-in-intellij-2017-on-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!