Karabiner-Elements I want to change key bind input same key + => = ,= => +

682 views Asked by At

please tell me.

I use mac's magic key board. this key board is [+] and [=] on same input key

So, [=] is default input key [=]

[+] is default input key [=] + [shift key]

I want to be inversion but,Not going well

please tell me.


Under,ideal setting

before:

[=] is default setting [=]

[+] is default setting [=] + [shift key] ↓

after:

[=] → [+]

[shift key] + [=] →[=]


          {
                "type": "basic",
                "from": {
                    "simultaneous": [
                        {
                            "key_code": "equal_sign"
                        },
                        {
                            "key_code": "left_shift"
                        }
                    ],
                    "modifiers": {
                        "optional": ["any"]
                    }
                },
                "to": [
                    {
                        "key_code": "equal_sign"
                    }
                ]
            },
            {
                "type": "basic",
                "from": {
                    "simultaneous": [
                        {
                            "key_code": "equal_sign"
                        }
                    ],
                    "modifiers": {
                        "optional": ["any"]
                    }
                },
                "to": [
                        {
                            "key_code": "equal_sign"
                        },
                        {
                            "key_code": "left_shift"
                        }
                ]
            }
1

There are 1 answers

0
clemsam lang On

here is a working solution; since I use a European keyboard I used a letter "o" for testing – you'll have to swap it with "equal_sign" for yours!

{  "description": "Will exchange principal with secondary key 'expression' …",
   "manipulators":
   [ {
           "type": "basic",
           "from": { "key_code": "o",
                     "modifiers": {
                        "mandatory": ["left_shift"],
                         "optional": ["any"] }
                   },
             "to": [ { "key_code": "o" } ]
     },
     {
             "type": "basic",
             "from": { "key_code": "o",
                       "modifiers": { "optional": ["any"] }
                     },
             "to": [ { "key_code": "o",
                       "modifiers": "left_shift" } ] 
     }
   ]
}