누구나 만족할 프로그램 2222

Jamkris (승현)·2024년 4월 18일
1

Little Tips

목록 보기
6/6
post-thumbnail

사건의 전말

23년도 1월쯔음에 누구나 만족할 프로그램 게시글을 올렸었다.

하지만

AutoHotKey는 MacOS에서 지원하지 않는 프로그램이었다. 나는 맥북으로 컴터 바꿨는데...

그래서

MacOS도 사용가능하도록 할수 있도록 하는 프로그램을 찾았다. 이름하여 "Karabiner-Elemets"이다.
전에 글에서도 이야기 했기에 간단히 이야기하면 CapsLock + jkil을 누르면 키보드 왼쪽 화살표와 같은 역할을 할 수 있게 해준다.
따라서 오른손을 움직이지 않고 화살표를 사용할 수 있다는 사실!
처음 맥을 사고 가장 불편했던 것이었는 데 엄청난 삽질로 찾아내었다. 이틀걸려따 개추

설치하기

설치 1

먼저 공식 사이트에 접속하자

그런다음 Download v14.13.0을 눌러 다운로드 해주자

설치 2

다운받은 파일을 실행해준다. 그럼 application 에서 아이콘 확인가능 하다.
Karabiner-Element 를 클릭 해보자

설치 3

그리고 SystemPreference - Security & Privacy -Input Monitoring 으로 들어가 일단 권한설정을 해주자.

이러면 설정은 완료이다.

Karabiner 세팅


여기에 이제 단축키를 세팅하면 된다. 파일형식은 .json이다.

JSON 설정

CAPSLOCK + IJKL to arrow keys

CapsLock을 누른상태로 iJKL로 방향키를 사용할 수 있다.

{
    "description": "CAPSLOCK + IJKL to arrow keys",
    "manipulators": [
        {
            "conditions": [
                {
                    "name": "caps_lock pressed",
                    "type": "variable_if",
                    "value": 1
                }
            ],
            "from": {
                "key_code": "k",
                "modifiers": {
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "down_arrow"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "name": "caps_lock pressed",
                    "type": "variable_if",
                    "value": 1
                }
            ],
            "from": {
                "key_code": "i",
                "modifiers": {
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "up_arrow"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "name": "caps_lock pressed",
                    "type": "variable_if",
                    "value": 1
                }
            ],
            "from": {
                "key_code": "j",
                "modifiers": {
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "left_arrow"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "name": "caps_lock pressed",
                    "type": "variable_if",
                    "value": 1
                }
            ],
            "from": {
                "key_code": "l",
                "modifiers": {
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "right_arrow"
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "caps_lock",
                "modifiers": {
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "set_variable": {
                        "name": "caps_lock pressed",
                        "value": 1
                    }
                }
            ],
            "to_after_key_up": [
                {
                    "set_variable": {
                        "name": "caps_lock pressed",
                        "value": 0
                    }
                }
            ],
            "to_if_alone": [
                {
                    "key_code": "caps_lock"
                }
            ],
            "type": "basic"
        }
    ]
}

!! 추가 세팅

CapsLock으로 한/영이 안되기 때문에 가능하도록 바꾸어주어야한다.

설정 > 키보드 > 키보드 단축키

키보드 단축키 > 입력소스 > 이전입력 소스 선택에 F18 더블클릭 > CapsLock한번 누르기
그러면 F18로 바뀌면서 한영키가 제대로 작동하는 것을 볼 수 있다.

Shift + Esc = `

미니배열 키보드를 사용하는 경우에는 esc에 ~ 와 `가 있기 때문에 불편하다 그래서 만들어본 기능이다.

{
    "description": "Shift + Esc = `",
    "manipulators": [
        {
            "conditions": [
                {
                    "identifiers": [
                        {
                            "is_keyboard": true,
                            "product_id": 591,
                            "vendor_id": 1452
                        }
                    ],
                    "type": "device_if"
                }
            ],
            "from": {
                "key_code": "escape",
                "modifiers": {
                    "mandatory": [
                        "shift"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "grave_accent_and_tilde"
                }
            ],
            "type": "basic"
        }
    ]
}

Control + Esc = ~

미니배열 키보드를 사용하는 경우에는 esc에 ~ 와 `가 있기 때문에 불편하다 그래서 만들어본 기능이다.

{
    "description": "Control + Esc =  ~",
    "manipulators": [
        {
            "conditions": [
                {
                    "identifiers": [
                        {
                            "is_keyboard": true,
                            "product_id": 591,
                            "vendor_id": 1452
                        }
                    ],
                    "type": "device_if"
                }
            ],
            "from": {
                "key_code": "escape",
                "modifiers": {
                    "mandatory": [
                        "control"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "grave_accent_and_tilde",
                    "modifiers": [
                        "shift"
                    ]
                }
            ],
            "type": "basic"
        }
    ]
}

CAPSLOCK + df to Change Windows

Mac에는 여러가지 작업데스크톱을 만들수 있다.

트랙패드로 이것들을 옮겨가며 쓸수 있는데 만약 클램쉘모드나, 노트북 거치대에 올린 경우 cotrol + 화살표로 옮겨야해서 정말 불편해 만들어본 기능이다.

{
    "description": "CAPSLOCK + df to Change Windows",
    "manipulators": [
        {
            "conditions": [
                {
                    "name": "caps_lock pressed",
                    "type": "variable_if",
                    "value": 1
                }
            ],
            "from": {
                "key_code": "d",
                "modifiers": {
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "left_arrow",
                    "modifiers": [
                        "left_control"
                    ]
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "name": "caps_lock pressed",
                    "type": "variable_if",
                    "value": 1
                }
            ],
            "from": {
                "key_code": "f",
                "modifiers": {
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "right_arrow",
                    "modifiers": [
                        "right_control"
                    ]
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "caps_lock",
                "modifiers": {
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "set_variable": {
                        "name": "caps_lock pressed",
                        "value": 1
                    }
                }
            ],
            "to_after_key_up": [
                {
                    "set_variable": {
                        "name": "caps_lock pressed",
                        "value": 0
                    }
                }
            ],
            "to_if_alone": [
                {
                    "key_code": "escape"
                }
            ],
            "type": "basic"
        }
    ]
}

CAPSLOCK + t to open APP

이건 앱을 단축키로 열수 있는 코드이다. 현재 CapsLock + t를 누르면 iTerm이 열리도록 세팅되어있다.
* Key_code 부분에 *에는 단축키로 쓸 키를 입력해주고
* Shell_Command 부분에 *에는 오픈할 앱 이름을 써주면 된다
꼭 앱이 아니여도 open 명령어로 열 수 있다면 다 가능하다.

{
    "description": "CAPSLOCK + t to open iTerm",
    "manipulators": [
        {
            "conditions": [
                {
                    "name": "caps_lock pressed",
                    "type": "variable_if",
                    "value": 1
                }
            ],
            "from": {
                "key_code": "*****",
                "modifiers": {
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "shell_command": "open -a '*****'"
                }
            ],
            "type": "basic"
        }
    ]
}
profile
Nothing Change If You Don't Try

0개의 댓글