Question

I just got a new Macbook Air, and was all excited to code: but then wham.

For example I cannot do command + / Which is pretty valuable when coding. It treats it as Command + {

I'm trying to use standard dvorak, not the Dvorak-Qwerty (not that I want to either) though it has the exact same issue.

It happens in both Netbeans and PHPStorm which leads to believe that this may be a mac issue and not an IDE issue. It's pretty frustrating trying to code when some keyboard shortcuts aren't working. While some like Command + C,V,Z work just fine.

How do I get these keyboard shortcuts to work as they do in any other operating system?

Was it helpful?

Solution

I'll repost here my answer from SO to the same problem:

It turns out this is a problem in Java that has existed for some years, and is still present in Java 9. See the bug report here: https://bugs.openjdk.java.net/browse/JDK-8022079

JetBrains has been aware of the problem for some years, but is waiting for Oracle to fix it. See these JetBrains bug reports: https://youtrack.jetbrains.com/issue/IDEABKL-6493 and https://youtrack.jetbrains.com/issue/IDEA-63779

In those reports you'll find a work-around using a free tool called Karabiner. I have just verified that it works for IntelliJ. It will probably also work for other Java-based tools.

The work-around is:

  • Download and install Karabiner from https://pqrs.org/osx/karabiner/
  • In the OSX System Preferences, set your keyboard to the default "U.S. International" PC. If you don't often type diacritics and other international characters, it's easier to just set the keyboard to "U.S" instead.
  • In the Karabiner settings, type "dvorak" in the search box, then scroll down to the section For U.S. Input Source and check Ùse Dvorak Keyboard Layout (QWERTY to Dvorak)`

OTHER TIPS

OK - I've just downloaded NetBeans and I see the same issue.

I think that this may be a JAVA issue, as both the IDEs you mentioned are JAVA applications. Cocoa apps such as TextMate seem to work fine.

It may not be the answer you want - but if you want to use the Dvorak layout and have modifier keys work correctly, use an IDE that's not written in JAVA.

I have seen a similar problem with Xcode and the Norwegian keyboard. In a previous question, the OP said that his comment shortcut does not work, and that the shortcut icon disappeared from the drop-down in the OS X navbar.

What seemed to work was to re-map the keys to something else as a workaround. The way was that you go to System Preferences > Keyboard > Shortcuts, then to App Shortcuts, add a new shortcut. Make the menu title exactly match the one in the OS X dropdown, and map the keyboard shortcut.

enter image description here

Let's say I for example wanted to re-map the keys of New Tab on Firefox. This is how it would look like.


I am however unsure if this will work for Java applications.

In macOS Sierra you can choose between the Dvorak and Dvorak Command (Programmer Dvorak) in System Preferences. So I no longer need Karabiner.

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top