Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Conversation

@eagleoflqj
Copy link
Member

fcitx-contrib/fcitx5-macos#188 only works for single key.

Test:

  • Map CapsLock to Hyper (Ctrl+Option+Command+Shift) and then Hyper+HJKL to Left, Down, Up, Right by writing .config/karabiner/karabiner.json:
{
    "profiles": [
        {
            "complex_modifications": {
                "rules": [
                    {
                        "description": "Caps Lock → Hyper Key (⌃⌥⇧⌘) (Caps Lock if alone)",
                        "manipulators": [
                            {
                                "from": { "key_code": "caps_lock" },
                                "to": [
                                    {
                                        "key_code": "left_shift",
                                        "modifiers": ["left_command", "left_control", "left_option"]
                                    }
                                ],
                                "to_if_alone": [{ "key_code": "caps_lock" }],
                                "type": "basic"
                            }
                        ]
                    },
                    {
                        "description": "Hyper + h/j/k/l == vim directional Keys",
                        "manipulators": [
                            {
                                "from": {
                                    "key_code": "k",
                                    "modifiers": { "mandatory": ["left_shift", "left_command", "left_control", "left_option"] }
                                },
                                "to": [{ "key_code": "up_arrow" }],
                                "type": "basic"
                            },
                            {
                                "from": {
                                    "key_code": "h",
                                    "modifiers": { "mandatory": ["left_shift", "left_command", "left_control", "left_option"] }
                                },
                                "to": [{ "key_code": "left_arrow" }],
                                "type": "basic"
                            },
                            {
                                "from": {
                                    "key_code": "j",
                                    "modifiers": { "mandatory": ["left_shift", "left_command", "left_control", "left_option"] }
                                },
                                "to": [{ "key_code": "down_arrow" }],
                                "type": "basic"
                            },
                            {
                                "from": {
                                    "key_code": "l",
                                    "modifiers": { "mandatory": ["left_shift", "left_command", "left_control", "left_option"] }
                                },
                                "to": [{ "key_code": "right_arrow" }],
                                "type": "basic"
                            },
                            {
                                "from": {
                                    "key_code": "semicolon",
                                    "modifiers": { "mandatory": ["left_shift", "left_command", "left_control", "left_option"] }
                                },
                                "to": [
                                    {
                                        "key_code": "right_arrow",
                                        "modifiers": ["left_command"]
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    }
                ]
            }
        }
    ]
}
  • Expand scroll for any rime schema, then Hyper+J should move highlight down, and no reset on release.

@github-actions
Copy link

Arch comparison

- x86_64 arm64 any
anthy
array
bamboo
boshiamy
cangjie
cantonese
chewing
chinese-addons
hallelujah
hangul
lua
quick
rime
sayura
skk
stroke
thai
unikey
wu
wubi86
wubi98
zhengma

22 plugins in total.

@eagleoflqj eagleoflqj requested a review from ksqsf September 12, 2024 02:45
@ksqsf ksqsf merged commit a59b76b into master Sep 12, 2024
4 checks passed
@ksqsf ksqsf deleted the keyup branch September 12, 2024 18:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants