如何交换方括号和大括号(karabiner)
How to exchange square bracket and curly bracket (karabiner)
在 Karabiner 规则 (https://pqrs.org/osx/karabiner/complex_modifications/) 上,有 Exchange paren and square bracket
的规则,但没有 Exchange square bracket and curly braket
的规则。
[问]如何通过Karabiner
或其他方式交换方括号和大括号?
求换:
[
=> {
和 {
=> [
]
=> }
和 }
=> ]
这段代码对我有用
{
"description": "Swap {} and []",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "open_bracket"
},
"to": [
{
"modifiers": ["left_shift"],
"key_code": "open_bracket"
}
]
},
{
"type": "basic",
"from": {
"key_code": "open_bracket",
"modifiers": {
"mandatory": ["left_shift"]
}
},
"to": [
{
"key_code": "open_bracket"
}
]
},
{
"type": "basic",
"from": {
"key_code": "close_bracket"
},
"to": [
{
"modifiers": ["left_shift"],
"key_code": "close_bracket"
}
]
},
{
"type": "basic",
"from": {
"key_code": "close_bracket",
"modifiers": {
"mandatory": ["left_shift"]
}
},
"to": [
{
"key_code": "close_bracket"
}
]
}
]
}
编辑:现在也在复杂 mod 列表中 https://pqrs.org/osx/karabiner/complex_modifications/#exchange_square_brackets_and_curly_brackets
在 Karabiner 规则 (https://pqrs.org/osx/karabiner/complex_modifications/) 上,有 Exchange paren and square bracket
的规则,但没有 Exchange square bracket and curly braket
的规则。
[问]如何通过Karabiner
或其他方式交换方括号和大括号?
求换:
[
=>{
和{
=>[
]
=>}
和}
=>]
这段代码对我有用
{
"description": "Swap {} and []",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "open_bracket"
},
"to": [
{
"modifiers": ["left_shift"],
"key_code": "open_bracket"
}
]
},
{
"type": "basic",
"from": {
"key_code": "open_bracket",
"modifiers": {
"mandatory": ["left_shift"]
}
},
"to": [
{
"key_code": "open_bracket"
}
]
},
{
"type": "basic",
"from": {
"key_code": "close_bracket"
},
"to": [
{
"modifiers": ["left_shift"],
"key_code": "close_bracket"
}
]
},
{
"type": "basic",
"from": {
"key_code": "close_bracket",
"modifiers": {
"mandatory": ["left_shift"]
}
},
"to": [
{
"key_code": "close_bracket"
}
]
}
]
}
编辑:现在也在复杂 mod 列表中 https://pqrs.org/osx/karabiner/complex_modifications/#exchange_square_brackets_and_curly_brackets