How to use certain keymaps of IntelliJ Idea with german Mac Keyboard
Solution 1
Try this out, CMD + _ on the German keyboard for comment: https://victorvolle.wordpress.com/2012/05/16/intellij-german-keyboard-shortcuts-reference/
Solution 2
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
Solution 3
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.
Solution 4
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.
Solution 5
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.
Comments
-
ohcibi almost 2 years
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. pressingCmd
+;
can only be achieved by pressingCmd
+Shift
+,
on a german layout, so this keymapping for opening the projects structure doesn't work. I helped myself out by mappingCmd
+Shift
+,
instead ofCmd
+;
.However for
Cmd
+/
(toggle line comment;Cmd
+Shift
+7
on german layout), this is not working. First problem of course is thatCmd
+Shift
+7
is already mapped unlikeCmd
+Shift
+,
. So I tried to remap toCmd
+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?
-
Yann Cébron about 10 yearsPlease file a bug with version + OS information and steps which reproduce this behavior youtrack.jetbrains.com/issues/IDEA
-
ohcibi over 9 yearsI dont have any numpad ob my MacBook 8-)
-
ohcibi over 9 yearsIn fact I'm using us layout now
-
QLag about 9 years@ohcibi You can disable the default Mac OS behaviour for Cmd+Num+/ shortcut in Settings=>Keyboafrd=>Shortcuts=>AppShortcuts
-
Grmpfhmbl almost 8 yearsThis translates to CMD + SHIFT + - and will additionally 'fold all'.. very annoying behavior of IntelliJ :-(
-
novice over 7 yearsI think, @gopek mean
CMD + -
. At least, it works for me. -
fiorentinoing about 7 yearsvalid for Italian keyboard too