1

I added the following rule to .config/karabiner/karabiner.json by importing a similar rule and changing the previous key code to "option". But the rule has no effect. Is there a problem with this rule?

"complex_modifications": {
    "parameters": {
        "basic.simultaneous_threshold_milliseconds": 50,
        "basic.to_delayed_action_delay_milliseconds": 500,
        "basic.to_if_alone_timeout_milliseconds": 1000,
        "basic.to_if_held_down_threshold_milliseconds": 500,
        "mouse_motion_to_scroll.speed": 100
    },
    "rules": [
        {
            "description": "Simultaneously press Option + Del to get a ForwardDel",
            "manipulators": [
                {
                    "from": {
                        "simultaneous": [
                            {
                                "key_code": "option"
                            },
                            {
                                "key_code": "delete_or_backspace"
                            }
                        ]
                    },
                    "to": [
                        {
                            "key_code": "delete_forward"
                        }
                    ],
                    "type": "basic"
                }
            ]
        }
    ]
},
[...]

The rule is supposed to delete "c" in "ab|cd" if "|" is the cursor and upon pressing [Option] + [Backspace].

I used a simple rule for turning [Caps Lock] into [Option]. This rule works.

Also - is there a simpler method for reloading a changed karabiner.json than closing Karabiner-Elements and starting again?

1

option should be defined as a modifier key. simultaneous is used for non-modifier keys. Besides, you'd better separate your mappings into a file from .config/karabiner/karabiner.json,

~/.config/karabiner/assets/complex_modifications/delete-forward.json

{
  "title": "Delete Forward",
  "rules": [
    {
      "description": "Simultaneously press Option + Del to get a ForwardDel",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "delete_or_backspace",
            "modifiers": {
              "mandatory":[
                "option"
              ]
            }
          },
          "to": [
            {
              "key_code": "delete_forward"
            }
          ]
        }
      ]
    }
  ]
}

Go to Karabiner-Elements Preferences -> Complex Modifications -> Rules, Click "Add rule". Then you'll see the new created rule from this separate file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .