Skip to content

Instantly share code, notes, and snippets.

@monosoul
Last active July 15, 2019 13:53
Show Gist options
  • Save monosoul/3f947c1ff08d980dedc495605fb1cae8 to your computer and use it in GitHub Desktop.
Save monosoul/3f947c1ff08d980dedc495605fb1cae8 to your computer and use it in GitHub Desktop.
Karabiner configuration to get Windows-like keymap in IntelliJ idea
{
"description": "ctrl/command swap",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.jetbrains\\.intellij$"
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "up_arrow",
"modifiers": {
"mandatory": [
"left_command"
]
}
},
"to": [
{
"key_code": "up_arrow",
"modifiers": [
"left_control"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.jetbrains\\.intellij$"
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "left_control",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_command"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.jetbrains\\.intellij$"
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "left_command",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control"
}
],
"type": "basic"
}
]
}
@monosoul
Copy link
Author

  • change the keymap in IntelliJ to "Default for XWin"
  • install karabiner-elements which allows any keyboard/mouse changes: https://github.com/tekezo/Karabiner-Elements
  • edit /Users//.config/karabiner/karabiner.json and add this rule in that json under profiles > complex_modifications > rules:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment