본문 바로가기

맥(솔라리스)

Karabiner-Elements

반응형

Karabiner-Elements를 사용하여 ins, del, home, end 키를 설정하는 방법

맥 키보드 키 설정(맵핑) 프로그램

Karabiner-Element 설치

Karabiner-Element : https://karabiner-elements.pqrs.org

karabiner.json 설정

cat ~/.config/karabiner/karabiner.json
{
    "global": {
        "check_for_updates_on_startup": true,
        "show_in_menu_bar": true,
        "show_profile_name_in_menu_bar": false
    },
    "profiles": [
        {
            "complex_modifications": {
                "parameters": {
                    "basic.simultaneous_threshold_milliseconds": 50,
                    "basic.to_delayed_action_delay_milliseconds": 500,
                    "basic.to_if_alone_timeout_milliseconds": 1000,
                    "basic.to_if_held_down_threshold_milliseconds": 500,
                    "mouse_motion_to_scroll.speed": 100
                },
                "rules": [
                    {
                        "description": "Function Copy",
                        "manipulators": [
                            {
                                "from": {
                                    "key_code": "insert",
                                    "modifiers": {
                                        "mandatory": [
                                            "left_control"
                                        ],
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "c",
                                        "modifiers": [
                                            "command"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    },
                    {
                        "description": "Function Paste(shift+insert)",
                        "manipulators": [
                            {
                                "from": {
                                    "key_code": "insert",
                                    "modifiers": {
                                        "mandatory": [
                                            "shift"
                                        ],
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "v",
                                        "modifiers": [
                                            "command"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    },
                    {
                        "description": "Function Cut",
                        "manipulators": [
                            {
                                "from": {
                                    "key_code": "delete_forward",
                                    "modifiers": {
                                        "mandatory": [
                                            "left_shift"
                                        ],
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "x",
                                        "modifiers": [
                                            "command"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    },
                    {
                        "description": "Home to Command Left",
                        "manipulators": [
                            {
                                "conditions": [
                                    {
                                        "bundle_identifiers": [
                                            "^com\\.microsoft\\.rdc$",
                                            "^com\\.microsoft\\.rdc\\.mac$",
                                            "^com\\.microsoft\\.rdc\\.macos$",
                                            "^com\\.microsoft\\.rdc\\.osx\\.beta$",
                                            "^net\\.sf\\.cord$",
                                            "^com\\.thinomenon\\.RemoteDesktopConnection$",
                                            "^com\\.itap-mobile\\.qmote$",
                                            "^com\\.nulana\\.remotixmac$",
                                            "^com\\.p5sys\\.jump\\.mac\\.viewer$",
                                            "^com\\.p5sys\\.jump\\.mac\\.viewer\\.web$",
                                            "^com\\.teamviewer\\.TeamViewer$",
                                            "^com\\.vmware\\.horizon$",
                                            "^com\\.2X\\.Client\\.Mac$",
                                            "^com\\.vmware\\.fusion$",
                                            "^com\\.vmware\\.horizon$",
                                            "^com\\.vmware\\.view$",
                                            "^com\\.parallels\\.desktop$",
                                            "^com\\.parallels\\.vm$",
                                            "^com\\.parallels\\.desktop\\.console$",
                                            "^org\\.virtualbox\\.app\\.VirtualBoxVM$",
                                            "^com\\.citrix\\.XenAppViewer$",
                                            "^com\\.vmware\\.proxyApp\\.",
                                            "^com\\.parallels\\.winapp\\.",
                                            "^org\\.macports\\.X11$",
                                            "^com\\.apple\\.Terminal$",
                                            "^com\\.googlecode\\.iterm2$",
                                            "^co\\.zeit\\.hyperterm$",
                                            "^co\\.zeit\\.hyper$",
                                            "^io\\.alacritty$",
                                            "^net\\.kovidgoyal\\.kitty$"
                                        ],
                                        "type": "frontmost_application_unless"
                                    }
                                ],
                                "from": {
                                    "key_code": "home"
                                },
                                "to": [
                                    {
                                        "key_code": "left_arrow",
                                        "modifiers": "command"
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    },
                    {
                        "description": "End to Command Right",
                        "manipulators": [
                            {
                                "conditions": [
                                    {
                                        "bundle_identifiers": [
                                            "^com\\.microsoft\\.rdc$",
                                            "^com\\.microsoft\\.rdc\\.mac$",
                                            "^com\\.microsoft\\.rdc\\.macos$",
                                            "^com\\.microsoft\\.rdc\\.osx\\.beta$",
                                            "^net\\.sf\\.cord$",
                                            "^com\\.thinomenon\\.RemoteDesktopConnection$",
                                            "^com\\.itap-mobile\\.qmote$",
                                            "^com\\.nulana\\.remotixmac$",
                                            "^com\\.p5sys\\.jump\\.mac\\.viewer$",
                                            "^com\\.p5sys\\.jump\\.mac\\.viewer\\.web$",
                                            "^com\\.teamviewer\\.TeamViewer$",
                                            "^com\\.vmware\\.horizon$",
                                            "^com\\.2X\\.Client\\.Mac$",
                                            "^com\\.vmware\\.fusion$",
                                            "^com\\.vmware\\.horizon$",
                                            "^com\\.vmware\\.view$",
                                            "^com\\.parallels\\.desktop$",
                                            "^com\\.parallels\\.vm$",
                                            "^com\\.parallels\\.desktop\\.console$",
                                            "^org\\.virtualbox\\.app\\.VirtualBoxVM$",
                                            "^com\\.citrix\\.XenAppViewer$",
                                            "^com\\.vmware\\.proxyApp\\.",
                                            "^com\\.parallels\\.winapp\\.",
                                            "^org\\.macports\\.X11$",
                                            "^com\\.apple\\.Terminal$",
                                            "^com\\.googlecode\\.iterm2$",
                                            "^co\\.zeit\\.hyperterm$",
                                            "^co\\.zeit\\.hyper$",
                                            "^io\\.alacritty$",
                                            "^net\\.kovidgoyal\\.kitty$"
                                        ],
                                        "type": "frontmost_application_unless"
                                    }
                                ],
                                "from": {
                                    "key_code": "end"
                                },
                                "to": [
                                    {
                                        "key_code": "right_arrow",
                                        "modifiers": "command"
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    },
                    {
                        "description": "Shift End to Shift Command Right",
                        "manipulators": [
                            {
                                "from": {
                                    "key_code": "end",
                                    "modifiers": {
                                        "mandatory": [
                                            "left_shift"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "right_arrow",
                                        "modifiers": [
                                            "command",
                                            "left_shift"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    },
                    {
                        "description": "Shift Home to Shift Command Left",
                        "manipulators": [
                            {
                                "from": {
                                    "key_code": "home",
                                    "modifiers": {
                                        "mandatory": [
                                            "left_shift"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "left_arrow",
                                        "modifiers": [
                                            "command",
                                            "left_shift"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    },
                    {
                        "description": "Hyper Bash Control: D ZXCVB",
                        "manipulators": [
                            {
                                "from": {
                                    "key_code": "d",
                                    "modifiers": {
                                        "mandatory": [
                                            "right_command",
                                            "right_control",
                                            "right_shift",
                                            "right_option"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "d",
                                        "modifiers": [
                                            "left_control"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "from": {
                                    "key_code": "z",
                                    "modifiers": {
                                        "mandatory": [
                                            "right_command",
                                            "right_control",
                                            "right_shift",
                                            "right_option"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "z",
                                        "modifiers": [
                                            "left_control"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "from": {
                                    "key_code": "x",
                                    "modifiers": {
                                        "mandatory": [
                                            "right_command",
                                            "right_control",
                                            "right_shift",
                                            "right_option"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "r",
                                        "modifiers": [
                                            "left_control"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "from": {
                                    "key_code": "c",
                                    "modifiers": {
                                        "mandatory": [
                                            "right_command",
                                            "right_control",
                                            "right_shift",
                                            "right_option"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "c",
                                        "modifiers": [
                                            "left_control"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "from": {
                                    "key_code": "v",
                                    "modifiers": {
                                        "mandatory": [
                                            "right_command",
                                            "right_control",
                                            "right_shift",
                                            "right_option"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "v",
                                        "modifiers": [
                                            "left_control"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "from": {
                                    "key_code": "b",
                                    "modifiers": {
                                        "mandatory": [
                                            "right_command",
                                            "right_control",
                                            "right_shift",
                                            "right_option"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "b",
                                        "modifiers": [
                                            "left_control"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    }
                ]
            },
            "devices": [
                {
                    "disable_built_in_keyboard_if_exists": false,
                    "fn_function_keys": [],
                    "identifiers": {
                        "is_keyboard": true,
                        "is_pointing_device": true,
                        "product_id": 597,
                        "vendor_id": 1452
                    },
                    "ignore": false,
                    "manipulate_caps_lock_led": true,
                    "simple_modifications": []
                },
                {
                    "disable_built_in_keyboard_if_exists": false,
                    "fn_function_keys": [],
                    "identifiers": {
                        "is_keyboard": true,
                        "is_pointing_device": true,
                        "product_id": 45081,
                        "vendor_id": 1133
                    },
                    "ignore": true,
                    "manipulate_caps_lock_led": true,
                    "simple_modifications": []
                }
            ],
            "fn_function_keys": [
                {
                    "from": {
                        "key_code": "f1"
                    },
                    "to": [
                        {
                            "consumer_key_code": "display_brightness_decrement"
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "f2"
                    },
                    "to": [
                        {
                            "consumer_key_code": "display_brightness_increment"
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "f3"
                    },
                    "to": [
                        {
                            "apple_vendor_keyboard_key_code": "mission_control"
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "f4"
                    },
                    "to": [
                        {
                            "apple_vendor_keyboard_key_code": "spotlight"
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "f5"
                    },
                    "to": [
                        {
                            "consumer_key_code": "dictation"
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "f6"
                    },
                    "to": [
                        {
                            "key_code": "f6"
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "f7"
                    },
                    "to": [
                        {
                            "consumer_key_code": "rewind"
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "f8"
                    },
                    "to": [
                        {
                            "consumer_key_code": "play_or_pause"
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "f9"
                    },
                    "to": [
                        {
                            "consumer_key_code": "fast_forward"
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "f10"
                    },
                    "to": [
                        {
                            "consumer_key_code": "mute"
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "f11"
                    },
                    "to": [
                        {
                            "consumer_key_code": "volume_decrement"
                        }
                    ]
                },
                {
                    "from": {
                        "key_code": "f12"
                    },
                    "to": [
                        {
                            "consumer_key_code": "volume_increment"
                        }
                    ]
                }
            ],
            "name": "Default profile",
            "parameters": {
                "delay_milliseconds_before_open_device": 1000
            },
            "selected": true,
            "simple_modifications": [],
            "virtual_hid_keyboard": {
                "country_code": 0,
                "indicate_sticky_modifier_keys_state": true,
                "mouse_key_xy_scale": 100
            }
        }
    ]
}

Karabiner-Elements
Karabiner-Elements

 

Mac에서 ins, del, home, end 키의 동작을 원하는 대로 설정할 수 있습니다.

 

728x90
반응형