Square brackets are very hard to write with the default key mapping option + 5,6. I changed it to shift + option + 8,9 using the tool karabiner elements. Just download and install karabiner elements, and make sure that all permissions are given. I had trouble doing so, and had to close and reopen the program several times, always prompting me other permissions that I then guaranteed. Then go to
cd ~/.config/karabiner/assets/complex_modifications/
And add a file containing
{
"title": "[] option + 5,6 to optione + shift + 8,9",
"rules": [
{
"description": "eckige klammern mit option left shift und 8 und 9 machen. Sonst machende diese Tasten ˜· (mittlerer Punkt, brauch ich nicht)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "8",
"modifiers": {
"mandatory": [
"left_option",
"left_shift"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "5",
"modifiers": ["left_option"]
}
]
},
{
"type": "basic",
"from": {
"key_code": "9",
"modifiers": {
"mandatory": [
"left_option",
"left_shift"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "6",
"modifiers": ["left_option"]
}
]
}
]
}
]
}
Finally activate the newly created rule.