Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set the execution interval between multiple key_codes? #2664

Closed
GanZhiXiong opened this issue Mar 21, 2021 · 4 comments
Closed

How to set the execution interval between multiple key_codes? #2664

GanZhiXiong opened this issue Mar 21, 2021 · 4 comments

Comments

@GanZhiXiong
Copy link
Contributor

For example, the following code has a time interval between 'a' and 'bc' of 900 milliseconds, but I do not know how to set the time interval between 'b' and 'c'?

      {
        "type": "basic",
        "from": {
          "key_code": "1"
        },
        "to": [{
          "key_code": "a"
        }],
        "to_delayed_action": {
          "to_if_invoked": [{
              "key_code": "b"
            },
            {
              "key_code": "c"
            }
          ]
        },
        "parameters": {
          "basic.to_delayed_action_delay_milliseconds": 900
        }
      }
@GanZhiXiong
Copy link
Contributor Author

@MuhammedZakir
Do you know how to solve this problem? No one responded for four days.
I guess you should know and look forward to your reply!
😀😀

@GanZhiXiong
Copy link
Contributor Author

@kozo2 @rys @sitaktif @gaomd
😂😂Sorry to bother you, but this problem has been bothering me for a long time. I've tried many things and failed, and I really want to know the answer.

Looking forward to your reply!
Thank you very much!

@MuhammedZakir
Copy link

MuhammedZakir commented May 24, 2021

Between b and c, will you press any other key? If not, you could try hold_down_milliseconds[1]. You can add a modifier key in between b and c and use hold_down_milliseconds option to set your interval. The downside is this will only work if you don't press any other key.

P.S. I didn't mention adding hold_down_milliseconds to b event, because you may get multiple b if you do that. I am not sure as I haven't checked it. You can give it a try.

[1] https://karabiner-elements.pqrs.org/docs/json/complex-modifications-manipulator-definition/to/hold-down-milliseconds/

Edit: If you have time, open a new issue asking for this feature - adding interval between to events.

@jvansant
Copy link

jvansant commented Jan 8, 2022

[1] https://karabiner-elements.pqrs.org/docs/json/complex-modifications-manipulator-definition/to/hold-down-milliseconds/

Adding hold-down-milliseconds to the first "too quick" keystroke did the trick for me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants