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

Key ups being sent if "set_notification_message" is enabled #4104

Open
ibrahimqasim opened this issue Jan 19, 2025 · 0 comments
Open

Key ups being sent if "set_notification_message" is enabled #4104

ibrahimqasim opened this issue Jan 19, 2025 · 0 comments

Comments

@ibrahimqasim
Copy link

I have the following rule set up:

{
    "description": "Create Hyper key",
    "manipulators": [
        {
            "description": "caps_lock -> command + option + control + left_shift, hyper = true, notification",
            "type": "basic",
            "from": {
                "key_code": "caps_lock",
                "modifiers": { "optional": ["any"] }
            },
            "to": [
                {
                    "key_code": "left_shift",
                    "modifiers": ["left_command", "left_option", "left_control"]
                },
                {
                    "set_variable": { "name": "hyper", "value": true }
                },
                {
                    "set_notification_message": {
                        "id": "hyper-layer-notification",
                        "text": "Hyper layer:\na: Application layer\nb: Browser layer"
                    }
                }
            ],
            "to_after_key_up": [
                { "set_variable": { "name": "hyper", "value": false } },
                {
                    "set_notification_message": {
                        "id": "hyper-layer-notification",
                        "text": ""
                    }
                }
            ]
        }
    ]
}

And in the Karabiner event viewer, I'm seeing:

down left_command
down left_control
down left_option
down left_shift
up left_shift
up left_control
up left_option
up left_command

This is even when the caps_lock is held.

If I remove the set_notification_message, then only left_shift goes to the up state. If I remove set_variable, then it behaves as expected.

I am trying to achieve the following behaviour:

  • When caps_lock is pressed or held, map it to cmd + opt + ctrl + shift
  • Set a hyper variable, which is needed to manage other rules
  • Set a notification to show the other layer options
  • Disabled the notification and hyper variable if caps_lock is released
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