Using Karabiner for multi key to multi key remapping
Ok I solved my two specific problems, though I am still not sure how I would replicate multiple key presses if more than one of them were not modifier keys.
Put the following two json files in user/.config/karabiner/assets/complex_modifications
{
"title": "Shift + Enter",
"rules": [
{
"description": "Shift + Enter to Option Enter (newline in messenger)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "return_or_enter",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock",
"option"
]
}
},
"to": [
{
"key_code": "return_or_enter",
"modifiers": [
"option"
]
}
]
}
]
}
]
}
This one (shift enter) is really frustrating me but not because of karabiner. In messenger i need to option+enter to get a new line character, but in the browser option-enter refuses to do anything. I wish I could get a key combination that does a consistent "safe" new line character, rather than making me fear I am going to accidentally press enter to send or complete or publish or something like that.
{
"title": "cmd + angle brackets for workspaces",
"rules": [
{
"description": "Use CMD + comma (left angle bracket key) to switch to left workspace",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "comma",
"modifiers": {
"mandatory": [
"command"
],
"optional": [
"caps_lock",
"option",
"control"
]
}
},
"to": [
{
"key_code": "left_arrow",
"modifiers": [
"control"
]
}
]
}
]
},
{
"description": "Use CMD + . (right angle bracket key) to switch to left workspace",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "period",
"modifiers": {
"mandatory": [
"command"
],
"optional": [
"caps_lock",
"option",
"control"
]
}
},
"to": [
{
"key_code": "right_arrow",
"modifiers": [
"control"
]
}
]
}
]
}
]
}
A solution to a similar question can be found here: How to bind a key to press two separate keys