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

Multiple remap #3816

Open
Falven opened this issue May 14, 2024 · 1 comment
Open

Multiple remap #3816

Falven opened this issue May 14, 2024 · 1 comment

Comments

@Falven
Copy link

Falven commented May 14, 2024

I'm trying to set up Karabiner-elements to remap both Cmd + Left Arrow to Home and Cmd to Ctrl simultaneously. Ie. if I press Cmd + Left Arrow it should send Home, but if I press, for example Cmd + D it should send Ctrl + D; or if I simply press Cmd it should send Ctrl.
The following are the rules in my karabiner.json:

[
    {
        "description": "(Remote Desktop) Cmd + Left Arrow to Home",
        "manipulators": [
            {
                "conditions": [
                    {
                        "bundle_identifiers": [
                            "com\\.microsoft\\.rdc\\.mac",
                            "com\\.ericom\\.blazeclient"
                        ],
                        "type": "frontmost_application_if"
                    }
                ],
                "type": "basic",
                "from": {
                    "key_code": "left_arrow",
                    "modifiers": {
                        "mandatory": [
                            "left_command"
                        ]
                    }
                },
                "to": [
                    {
                        "key_code": "home"
                    }
                ]
            }
        ]
    },
    {
        "description": "(Remote Desktop) Cmd to Ctrl for other keys",
        "manipulators": [
            {
                "conditions": [
                    {
                        "bundle_identifiers": [
                            "com\\.microsoft\\.rdc\\.mac",
                            "com\\.ericom\\.blazeclient"
                        ],
                        "type": "frontmost_application_if"
                    }
                ],
                "type": "basic",
                "from": {
                    "key_code": "left_command",
                    "modifiers": {
                        "optional": [
                            "any"
                        ]
                    }
                },
                "to": [
                    {
                        "key_code": "left_control"
                    }
                ]
            }
        ]
    }
]

I was thinking, in my rules, that the first manipulator would be matched on Cmd + Left Arrow but then not matched on any other Cmd + * key press, leading the second manipulator to be matched for those. But currently, it seems only the second is matched when using Cmd + Left Arrow for some reason.

@Falven
Copy link
Author

Falven commented May 16, 2024

Essentially there's no easy way I found after looking all around the internet for a few days. The way I ended up doing this is by binding every single combination I need. CMD+Whatever to CTRL+Whatever

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