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

Add ability to pause between keystrokes arbitrarily anywhere #3807

Open
momomo opened this issue May 6, 2024 · 0 comments
Open

Add ability to pause between keystrokes arbitrarily anywhere #3807

momomo opened this issue May 6, 2024 · 0 comments

Comments

@momomo
Copy link

momomo commented May 6, 2024

Take this example:


{
        // Does not really work well
        "type": "basic",
        
        "from": {
            "key_code": "period",
            "modifiers": {
                "mandatory": [
                    "left_shift",
                    "left_option"
                ]
            }
        },
        
        "to": [
            
            {
                "key_code": "right_arrow",
                "modifiers": [
                    "left_option",
                    
                    "right_control",
                    "right_shift"
                ]
            },

            // Pause here for 0.25 seconds 
            
            {
                "key_code": "tab",
                "modifiers": [
                    "left_command"
                ]
            },
          
            // Pause here for 0.25 seconds 

            {
                "key_code": "left_arrow",
                "modifiers": [
                    "left_option",
                    
                    "right_control",
                    "right_shift"
                ]
            }
            
        ]
    }

The issue is that the keys are invoked way too fast after each other thus not allowing the computer to execute the intended actions fully.

Ideally we would like to pause between certain keystrokes as a program might be running that is laggy or slow.

It could be something along the lines

{
   wait: {
        time: 500
   }
   
}

or

{
   wait: {
        until: application is in front "abcdef" 
   }
   
}

you would likely have to rework how things are executed or add a whole new to_pausable logic to handle it to pull this off.

However, the need for something like this has arisen multiple times so it is a very valid usecase. Sometimes, there needs to be a delay when one keystroke or shortcut is to trigger multiple keystrokes that do things that might take certain time. We the developer is already in a messy situation utilizing karabiner so its just about enabling the workflow to improve further.

If you don't see the usecase, realize the use case is not about you.

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

1 participant