Karabiner-elements: How to improve the delay/lag experience when using TouchCursor Mode?

Created on 30 Apr 2018  ·  8Comments  ·  Source: pqrs-org/Karabiner-Elements

Hi,

Does anyone have experienced some kind of lag/delay when using a single or a number of rules in their complex modifications settings?

I'm currently using the TouchCursor Mode as the sole rule in my complex modifications settings. I've been using this mode/rule since 2012 when Karabiner-Elements was still KeyRemap4MacBook. The lag isn't that noticeable back then (didn't felt/notice it) compared to now when I updated to High Sierra, and used Karabiner-Elements.

I type fast and notice that it couldn't keep up with my pace. Back then on OS X Lion and KeyRemap4MacBook it worked perfectly fine without even noticing the lag/delay. I never touched any threshold setting (it was in XML if I recall) back then, and simply used it as is (it was configured by @tekezo in our Google group discussion years ago).

Is there any optimal setting to configure in order to lessen the lag/delay? It may have something to do with the keyup and keydown events. It's really different when I exit/quit Karabiner-Elements because I'm able to type properly compared to have it running.

I'd love to know your similar experiences and suggestions if ever.

stale

Most helpful comment

hey @jhwheeler i did, i use this config now and things seem to be good

in $HOME/.config/karabiner/assets/complex_modifications/caps_ctrl_esc.json

{
  "title": "Change caps_lock to Esc and Control",
  "rules": [{
    "description": "caps_lock: Esc if pressed, Control if held.",
    "manipulators": [{
      "type": "basic",
      "from": {"key_code": "left_control", "modifiers": {"optional": ["any"]}},
      "to": [{"key_code": "left_control", "lazy": true}],
      "to_if_alone": [{"key_code": "escape"}]
    }]
  }]
}

then in karabiner

Simple Modification:

image

and Complex Modification:

image

with these parameters:

image

and in macOS Settings > Keyboard > Modifier Keys...

image

hope that helps!

All 8 comments

@panoysia After Karabiner update to 12.1.0 with {halt}. This is my latest config.
Maybe you can try this and if have any idea to improve it, feel free to discuss it here ^^.

TouchCursor for Karabiner12.1.0 with added {halt} (recommend to use with 150ms delayed_action)

@pandaben7890 Thank you for sharing this. I will try this out and comment back here my experience.

I miss the lag-free and fast typing experience when it was still called KeyRemap4Macbook.

I want it to be like TouchCursor on Windows too. But this is all I can U_U

2018-06-05 20:06 GMT+07:00 Elmer A. Sia notifications@github.com:

@pandaben7890 https://github.com/pandaben7890 Thank you for sharing
this. I will try this out and comment back here my experience.

I miss the lag-free and fast typing experience when it was still called
KeyRemap4Macbook.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tekezo/Karabiner-Elements/issues/1380#issuecomment-394701486,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADRRb9vdG759AXfkfW6_OWPSNDPvaEqUks5t5oI7gaJpZM4Ts_HK
.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I'm definitely experiencing this. I'm running a really skinny default setup on macOS going for a modifier on Cap Lock (hold is Ctrl tap is Escape). When using applications like VIM though the lag gets me occasionally.

Any tools I can use to measure this and share here?

Here's my current config

{
    "global": {
        "check_for_updates_on_startup": false,
        "show_in_menu_bar": true,
        "show_profile_name_in_menu_bar": false
    },
    "profiles": [
        {
            "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
                },
                "rules": [
                    {
                        "manipulators": [
                            {
                                "description": "Change caps_lock to control when used as modifier, escape when used alone",
                                "from": {
                                    "key_code": "caps_lock",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "left_control"
                                    }
                                ],
                                "to_if_alone": [
                                    {
                                        "key_code": "escape",
                                        "modifiers": {
                                            "optional": [
                                                "any"
                                            ]
                                        }
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    }
                ]
            },
            "devices": [],
            "fn_function_keys": [
                {
                    "from": {
                        "key_code": "f1"
                    },
                    "to": {
                        "consumer_key_code": "display_brightness_decrement"
                    }
                },
                {
                    "from": {
                        "key_code": "f2"
                    },
                    "to": {
                        "consumer_key_code": "display_brightness_increment"
                    }
                },
                {
                    "from": {
                        "key_code": "f3"
                    },
                    "to": {
                        "key_code": "mission_control"
                    }
                },
                {
                    "from": {
                        "key_code": "f4"
                    },
                    "to": {
                        "key_code": "launchpad"
                    }
                },
                {
                    "from": {
                        "key_code": "f5"
                    },
                    "to": {
                        "key_code": "illumination_decrement"
                    }
                },
                {
                    "from": {
                        "key_code": "f6"
                    },
                    "to": {
                        "key_code": "illumination_increment"
                    }
                },
                {
                    "from": {
                        "key_code": "f7"
                    },
                    "to": {
                        "consumer_key_code": "rewind"
                    }
                },
                {
                    "from": {
                        "key_code": "f8"
                    },
                    "to": {
                        "consumer_key_code": "play_or_pause"
                    }
                },
                {
                    "from": {
                        "key_code": "f9"
                    },
                    "to": {
                        "consumer_key_code": "fastforward"
                    }
                },
                {
                    "from": {
                        "key_code": "f10"
                    },
                    "to": {
                        "consumer_key_code": "mute"
                    }
                },
                {
                    "from": {
                        "key_code": "f11"
                    },
                    "to": {
                        "consumer_key_code": "volume_decrement"
                    }
                },
                {
                    "from": {
                        "key_code": "f12"
                    },
                    "to": {
                        "consumer_key_code": "volume_increment"
                    }
                }
            ],
            "name": "Default profile",
            "selected": true,
            "simple_modifications": [],
            "virtual_hid_keyboard": {
                "country_code": 0
            }
        }
    ]
}

Would love any suggestions feedback. Cheers guys 👍

@her Did you ever figure this out? I'm experiencing the same issue with Caps Lock mapped to esc/ctrl creating a lag in Vim.

hey @jhwheeler i did, i use this config now and things seem to be good

in $HOME/.config/karabiner/assets/complex_modifications/caps_ctrl_esc.json

{
  "title": "Change caps_lock to Esc and Control",
  "rules": [{
    "description": "caps_lock: Esc if pressed, Control if held.",
    "manipulators": [{
      "type": "basic",
      "from": {"key_code": "left_control", "modifiers": {"optional": ["any"]}},
      "to": [{"key_code": "left_control", "lazy": true}],
      "to_if_alone": [{"key_code": "escape"}]
    }]
  }]
}

then in karabiner

Simple Modification:

image

and Complex Modification:

image

with these parameters:

image

and in macOS Settings > Keyboard > Modifier Keys...

image

hope that helps!

@her This is brilliant, thank you! It finally works...I'm really grateful, this will help my workflow immensely.

Was this page helpful?
0 / 5 - 0 ratings