Developing on Mac and on Windows (Keyboard shortcuts)

80% of the time I'm developing on the mac. However I do some contract work and with that client I have to run windows under a vm. I'm testing PhpStorm and I found that the key commands are very different on the two platforms. I kept getting tripped up and eventually went back to Sublime Text on windows to get through the day. However I'd really like to stick with PhpStorm in order to really grok it.

What would you suggest I do, keyboard shortcut wise? What would you suggest?

Thanks,
Rick

2 comments
Comment actions Permalink

Hi,

And can you try to create two different keymap shemes for Windows and Mac OS (Preferences | IDE settings | Keymap) and just switch between them? It doesn't need the restart of IDE.

0
Comment actions Permalink

That was a pain for me aswell. Iam working at sometimes at IntelliJ in windows, linux and macOS and just don't want to handle the different layouts mentally.

Ive finally succeeded at having the same layout and I also swapped the control/command buttons on the keyboard (i am using a regular windows keyboard) in all applications except IntelliJ so I can use ctrl + c/v/a/f/... through the whole system.

1. changed the keymap in IntelliJ to "Default for XWin"
2. installed karabiner-elements which allows any keyboard/mouse changes: https://github.com/tekezo/Karabiner-Elements
3. edited my /Users/username/.config/karabiner/karabiner.json and added my own rule in that json under profiles > complex_modifications > rules:

here with indented json: https://stackoverflow.com/a/49705641/4767781 


{
"description": "ctrl/command swap",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.jetbrains\\.intellij$"
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "left_control"
},
"to": [
{
"key_code": "left_command"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.jetbrains\\.intellij$"
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "left_command"
},
"to": [
{
"key_code": "left_control"
}
],
"type": "basic"
}
]
}

1

Please sign in to leave a comment.