我对卡拉巴赫很陌生。据我所知,这个程序可以改变键盘映射。我理解并能够使用“简单修改”从键“键”到“键”。
但是,如果我想将我的Home按钮重新映射到CTRL+LEFT_ARROW,我该如何做呢?
目前在MacOs Mojave上
发布于 2020-07-31 16:17:08
打开~/.config/karabiner/karabiner.json编辑文件,从根级>“概要文件”> "complex_modifications“>参数:{. }下添加:
"rules": [
{
"description": "Home to Control Left",
"manipulators": [
{
"from": {
"key_code": "home"
},
"to": [
{
"key_code": "left_arrow",
"modifiers": "control"
}
],
"type": "basic"
}
]
},
{
"description": "End to Control Right",
"manipulators": [
{
"from": {
"key_code": "end"
},
"to": [
{
"key_code": "right_arrow",
"modifiers": "control"
}
],
"type": "basic"
}
]
}
]请注意,这将显示:
发布于 2022-09-18 16:06:54
将~/.config/karabiner/line.json创建为:
{
"title": "Line-related mappings",
"rules": [
{
"description": "Home to Cmd+Left: Move to line start",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "home",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "left_arrow",
"modifiers": "command"
}
]
}
]
},
{
"description": "Shift+Home to Shift+Cmd+Left: Select to line start",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "home",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "left_arrow",
"modifiers": [
"shift",
"command"
]
}
]
}
]
},
{
"description": "End to Cmd+Right: Move to line end",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "end",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "right_arrow",
"modifiers": "command"
}
]
}
]
},
{
"description": "Shift+End to Shift+Cmd+Right: Select to line end",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "end",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "right_arrow",
"modifiers": [
"shift",
"command"
]
}
]
}
]
}
]
}然后在卡拉巴赫,转到Preferences ->复合修改-> Add Rules -> All。
以上和其他内容可以在https://github.com/noel-yap/karabiner中找到。
https://stackoverflow.com/questions/63194740
复制相似问题