r/Karabiner•
eldaras

Mouse debounce

My trusty 5-year old mouse started registering double clicks when I do a single click and was hoping to debounce them with Karabiner, but I haven't been able to come up with a complex modification to do this.

I came up with this complex modification, but it doesn't work.

{
    "description": "Prevent rapid double clicks on left mouse button",
    "manipulators": [
        {
            "conditions": [
                {
                    "name": "mouse_click_debounce",
                    "type": "variable_unless",
                    "value": 1
                }
            ],
            "from": { "pointing_button": "button1" },
            "parameters": { "to_delayed_action_delay_milliseconds": 150 },
            "to": [{ "pointing_button": "button1" }],
            "to_after_key_up": [
                {
                    "set_variable": {
                        "name": "mouse_click_debounce",
                        "value": 1
                    }
                }
            ],
            "to_delayed_action": {
                "to_if_canceled": [
                    {
                        "set_variable": {
                            "name": "mouse_click_debounce",
                            "value": 0
                        }
                    }
                ],
                "to_if_invoked": [
                    {
                        "set_variable": {
                            "name": "mouse_click_debounce",
                            "value": 0
                        }
                    }
                ]
            },
            "type": "basic"
        }
    ]
}

I've written some basic modifications for my keyboard, but I'm a bit lost on these complex modifications that require timeouts/delays.

Posted Jul 5, 2025, 12:05 PM UTC

10
Loading comments…