Karabiner-elements: One key to many keys (non modifier)

Created on 2 Aug 2017  路  2Comments  路  Source: pqrs-org/Karabiner-Elements

There are one to many mappings where a key is mapped to another key with modifiers (Control, Shift, Command. Option), but how do I map a key to many non modifier keys?

For example, I want to map numlock to keys such that "github" is input, how can I do this. There is text expansion in macOS, but I want to use this at a system level.

{
    "manipulators": [
        {
            "description": "Numlock",
            "from": {
                "key_code": "keypad_num_lock"
            },
            "to": [
                {
                    "key_code": "g"
                }
            ],
            "type": "basic"
        }
    ]
}

With this, I tried so far
"key_code": "github", "key_code": "g + i + t + h + u + b", "key_code": ["g", "i", "t", "h", "u", "b" ].

Thank you.

Most helpful comment

{
    "manipulators": [
        {
            "description": "Numlock",
            "from": {
                "key_code": "keypad_num_lock"
            },
            "to": [
                {
                    "key_code": "g"
                },
                {
                    "key_code": "i"
                },
                {
                    "key_code": "t"
                },
                {
                    "key_code": "h"
                },
                {
                    "key_code": "u"
                },
                {
                    "key_code": "b"
                },
                {
                    "key_code": "vk_none"
                }
            ],
            "type": "basic"
        }
    ]
}

The last vk_none is a virtual key which will terminate the key sequence.

All 2 comments

{
    "manipulators": [
        {
            "description": "Numlock",
            "from": {
                "key_code": "keypad_num_lock"
            },
            "to": [
                {
                    "key_code": "g"
                },
                {
                    "key_code": "i"
                },
                {
                    "key_code": "t"
                },
                {
                    "key_code": "h"
                },
                {
                    "key_code": "u"
                },
                {
                    "key_code": "b"
                },
                {
                    "key_code": "vk_none"
                }
            ],
            "type": "basic"
        }
    ]
}

The last vk_none is a virtual key which will terminate the key sequence.

That worked.

Thank you :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LittleNewton picture LittleNewton  路  3Comments

baurmatt picture baurmatt  路  3Comments

Ox0400 picture Ox0400  路  3Comments

aniude picture aniude  路  3Comments

impala75 picture impala75  路  3Comments