8
votes

update

I'm using us layout now. But the problem is that the key bindings are not bound to the characters a key would produce but to the key itself. So for example commenting is cmd+- as - is on the same key on German layout as / on us. So cmd+\ translates to cmd+- on German layout. It's not fixed on Idea14, don't know about 15.

When using default shortcuts of IntelliJ Idea, some of them are not working properly on a German Keyboard. Mostly because there is a key that is available without pressing Shift on an us layout. E.g. pressing Cmd+; can only be achieved by pressing Cmd+Shift+, on a german layout, so this keymapping for opening the projects structure doesn't work. I helped myself out by mapping Cmd+Shift+, instead of Cmd+;.

However for Cmd+/ (toggle line comment; Cmd+Shift+7 on german layout), this is not working. First problem of course is that Cmd+Shift+7 is already mapped unlike Cmd+Shift+,. So I tried to remap to Cmd+Shift+L which wasn't mapped already, but the comment toggling won't work.

I gotta add that I'm using IdeaVim Plugin and I have three different options that are called "Comment with (Line|Block) comment", all under a different hierarchy (Code->Folding, Plugins->IdeaVim and just Other. Which one is the right?

How do you tackle these problems on a non-us layout and a mac keyboard?

10
All the answers only have workarounds. It turned out to be a bug caused by non us keymappings. I’m not using German keyboard layout anymore hence I’ve no clue if this bug is solved or still In place and can’t accept any answer as none has news on that. I won’t accept workarounds as answers if there is a know bug. - ohcibi

10 Answers

4
votes

You just have to know where the shortcut symbols displayed in the editors are on a US-keyboard.

On OSX you can look this up in the Keyboard settings. Add a US-Keyboard as a source and you get the positions of the symbols displayed. On Windows there should be tools for that as well.

For example the shortcuts cmd+[ and cmd+] (for navigating back and forward) are cmd+ü and cmd++ on a german keyboard because "ü" and "+" on german keyboard are "[" and "]" on US-keyboards. I think this is alright because on a german keyboard this shortcut would not be usable because it would be wrongly interpreted as "cmd+alt+5" and "cmd+alt+6".

It's a bit ugly that the editors (PHPStorm has the same issue) don't display the right keys, but for me it wasn't a big issue anymore as soon as I learned the positions on a US-Keyboard.

Anyway I really wonder why only the symbols are affected by this issue. "Y" und "Z" keys are shown correctly in the IDE.

4
votes

This thread on their bug database has better answers:

https://youtrack.jetbrains.com/issue/IDEA-63779#tab=Comments

Specifically, go to Find Action..., type "Registry", scroll down to

ide.non.english.keyboard.layout.fix

And check the box

3
votes

Unfortunately this is a known problem, e.g. http://youtrack.jetbrains.com/issue/IDEA-16116 I suggest you remap the shortcuts which do not work on DE keyboard.

2
votes

You can still use the symbols that are on the numeric pad. So instead of normal Cmd + / where you reach "/" via Shift, you can use Cmd + Num /; same goes for commands using + and - on numeric pad.

Now I do this on PC (so Ctrl instead of Cmd), but I do not see why it should not work on Mac the same way.

1
votes

I figured out how to comment/uncomment lines using keyboard shortcut. It turns out that the shortcut is CMD+. instead of CMD+/

Following is a US keyboard layout of a non-mac computer:

http://i.imgur.com/OSXWg3G.jpg?2

I have a . button in the same location as the picture. When I used '.' button in my Turkish MacBook Pro, I was able comment/uncomment lines.

1
votes

Not for Mac but for Windows: use Ctrl + / (number pad). The only way it works for me with version 15.

Or you change it in keyword settings.

The bug still open since 9 years and nobody fix the problems (that not the only one). Can´t believe it https://youtrack.jetbrains.com/issue/IDEA-16116#tab=Comments

If you push Strg+/ in keyboard settings you get "Strg + 7". If you push Strg+Shift+/ you get "Strg + Shift + Schrägstrich". Crazy.

I found so many bugs in only 3 days of use.

One other thing is, if i check the checkbox "Deutsch layout support" in the keyboard settings, i cant push apply. When i choose ok and go back the checkbox isnt checked.

0
votes

IntelliJ IDEA ULTIMATE 2016.2 MacBook - german keyboard layout

"cmd + -" to comment the current line, press it again to uncomment...

0
votes

There is another slightly different approach here: first of all, check out what is actually defined.

Meaning: open Preferences/Keymap, and check out all the shortcuts that are listed for the action you need.

Example: the "navigate back" from the menu tells you cmd+[, which doesn't work with a German keyboard layout. But when you look into the keymap, you find 3 different mappings for that entry:

screenshot

And: opt+cmd+arrow left (right for "forward") works nicely on a German keyboard, too!

-1
votes

This problem is conflict IdeaVim Plugins on Macbook, to fixed then simple go to Plugins Management then remove and restart