英文:
How to configure the 'control' key to work as 'backspace' alone and also to as 'control' when combined with other key in karabiner?
问题
I'm trying to make the control key backspace when pressed alone and also work as left control when combined with another key (eg I use control h, j, k, l for up, down, left, right), any help? for some reason, it's not working how I designed it.
https://i.stack.imgur.com/2VIud.jpg
expecting: the control key to having multi-functionality with 'backspace' and 'control'
英文:
I'm trying to make the control key backspace when pressed alone and also work as left control when combined with another key ( eg I use control h,j,k,l for up down left right), any help? for some reason, it's not working how I designed it.
https://i.stack.imgur.com/2VIud.jpg
expecting: the control key to having multi-functionality with 'backspace' and 'control'
答案1
得分: 1
我搞清楚了,并制作了两个版本,'control'必须替换为'left_control':
第一个版本:
{
"description": "按下单独时,control 为退格键",
"manipulators": [
{
"from": {
"key_code": "left_control",
"modifiers": {
"optional": ["any"]
}
},
"parameters": {
"basic.to_if_alone_timeout_milliseconds": 300,
"basic.to_if_held_down_threshold_milliseconds": 0
},
"to_if_alone": [
{
"key_code": "delete_or_backspace"
}
],
"to_if_held_down": [
{
"key_code": "left_control"
}
],
"type": "basic"
}
]
}
第二个版本:
{
"description": "将control按下时与其他键一起按下,单独按下时为退格键。",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_control",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_control"
}
],
"to_if_alone": [
{
"key_code": "delete_or_backspace"
}
]
}
]
}
希望这对你有帮助。
英文:
I figured it out and made 2 versions 'control' had to be substituted for 'left_control':
{
"description": "control is backspace when pressed alone",
"manipulators": [
{
"from": {
"key_code": "left_control",
"modifiers": {
"optional": [
"any"
]
}
},
"parameters": {
"basic.to_if_alone_timeout_milliseconds": 300,
"basic.to_if_held_down_threshold_milliseconds":0
},
"to_if_alone": [
{
"key_code": "delete_or_backspace"
}
],
"to_if_held_down": [
{
"key_code": "left_control"
}
],
"type": "basic"
}
]
}
{
"description": "Change control to control if pressed with other keys, to backspace if pressed alone.",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_control",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control"
}
],
"to_if_alone": [
{
"key_code": "delete_or_backspace"
}
]
}
]
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论