pqrs-org / Karabiner-Elements

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

Cmd + Option Switched on ANSI Keyboard Type #3988

Closed M1kep closed 2 weeks ago

M1kep commented 1 month ago

Since 15.1 Cmd and Option keys are swapped(I have to press Opt + A to select all), unless I switch to ISO, but then other keys are incorrect. The key presses show properly in the event viewer.

The following mappings "solves" the issue: CleanShot 2024-10-29 at 16 51 43

Physical Device(Apple Magic Keyboard)

        "device_identifiers": {
            "is_keyboard": true,
            "product_id": 671,
            "vendor_id": 76
        },
krykra7 commented 3 weeks ago

I have the same issue, strangely sometimes it does work correctly as if not swapped.

tekezo commented 2 weeks ago

Please check macOS system settings. https://karabiner-elements.pqrs.org/docs/help/troubleshooting/breaking-changes/#modifiers

kruzyk commented 2 weeks ago

I have the same problem. And I have macOS settings same as in the link. Didn't change anything and it just stopped working.

I have this and nothing works: Screenshot 2024-11-13 at 03 31 23

image image Screenshot 2024-11-13 at 03 34 12


    "profiles": [
        {
            "complex_modifications": {
                "rules": [
                    {
                        "description": "Swap right cmd with right option",
                        "manipulators": [
                            {
                                "from": {
                                    "key_code": "right_control",
                                    "modifiers": { "optional": ["any"] }
                                },
                                "to": [{ "key_code": "right_command" }],
                                "type": "basic"
                            },
                            {
                                "from": {
                                    "key_code": "right_command",
                                    "modifiers": { "optional": ["any"] }
                                },
                                "to": [{ "key_code": "right_control" }],
                                "type": "basic"
                            }
                        ]
                    },
                    {
                        "description": "Use Delete as Move to Trash",
                        "manipulators": [
                            {
                                "conditions": [
                                    {
                                        "bundle_identifiers": [
                                            "^com.apple.finder"
                                        ],
                                        "type": "frontmost_application_if"
                                    }
                                ],
                                "from": {
                                    "key_code": "delete_forward",
                                    "modifiers": { "optional": ["any"] }
                                },
                                "to": [
                                    {
                                        "key_code": "delete_or_backspace",
                                        "modifiers": ["left_command"]
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    }
                ]
            },
            "devices": [
                {
                    "identifiers": {
                        "is_keyboard": true,
                        "product_id": 591,
                        "vendor_id": 1452
                    },
                    "simple_modifications": [
                        {
                            "from": { "key_code": "right_command" },
                            "to": [{ "key_code": "right_option" }]
                        }
                    ]
                }
            ],
            "name": "Default profile",
            "selected": true,
            "virtual_hid_keyboard": {
                "country_code": 0,
                "keyboard_type_v2": "ansi"
            }
        }
    ]
}
kruzyk commented 1 week ago

I restored my backup karabiner config and this works:


    "profiles": [
        {
            "devices": [
                {
                    "identifiers": {
                        "is_keyboard": true,
                        "product_id": 591,
                        "vendor_id": 1452
                    },
                    "simple_modifications": [
                        {
                            "from": { "key_code": "right_command" },
                            "to": [{ "key_code": "right_option" }]
                        }
                    ]
                }
            ],
            "name": "Default profile",
            "selected": true,
            "virtual_hid_keyboard": {
                "country_code": 0,
                "keyboard_type_v2": "ansi"
            }
        }
    ]
}`