pqrs-org / Karabiner-Elements

Karabiner-Elements is a powerful tool for customizing keyboards on macOS
https://karabiner-elements.pqrs.org/
The Unlicense
18.94k stars 839 forks source link

front_application_else #2683

Open prasskaly opened 3 years ago

prasskaly commented 3 years ago

Hi, I am trying to reduce my wrist pain by remapping some basic shortcuts to wrist-friendly shortcuts and I was wondering if there's a front_application_if.. front_application_else construct available. I can definitely use front_application_unless and front_application_if for the same key combination, but just wanted to know if there's any better way to do this.

                {
                    "description": "Space + 5 = Undo",
                    "manipulators": [
                        {
                            "conditions": [
                                {
                                    "bundle_identifiers": [
                                        "^com.tigervnc.tigervnc"
                                    ],
                                    "type": "frontmost_application_unless"
                                }
                            ],
                            "from": {
                                "key_code": "5",
                                "modifiers": {
                                    "mandatory": [
                                        "fn"
                                    ],
                                    "optional": [
                                        "any"
                                    ]
                                }
                            },
                            "to": [
                                {
                                    "key_code": "z",
                                    "modifiers": [
                                        "left_command"
                                    ]
                                }
                            ],
                            "type": "basic"
                        }
                    ]
                },
                {
                    "description": "Space + 5 = Undo",
                    "manipulators": [
                        {
                            "conditions": [
                                {
                                    "bundle_identifiers": [
                                        "^com.tigervnc.tigervnc"
                                    ],
                                    "type": "frontmost_application_if"
                                }
                            ],
                            "from": {
                                "key_code": "5",
                                "modifiers": {
                                    "mandatory": [
                                        "fn"
                                    ],
                                    "optional": [
                                        "any"
                                    ]
                                }
                            },
                            "to": [
                                {
                                    "key_code": "z",
                                    "modifiers": [
                                        "left_control"
                                    ]
                                }
                            ],
                            "type": "basic"
                        }
                    ]
                },
dPowNextdoor commented 3 years ago

FYI I just created this issue that would help solve the pain points you're experiencing. Feel free to comment/upvote to attract greater attention from the devs!

stale[bot] commented 2 years ago

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.