Karabiner 캡스 락 - Karabiner kaebseu lag

Programming/etc.

[Mac] Karabiner-Elements로 caps lock 한영 전환 딜레이 없애기

류시명 2020. 3. 5. 22:18

[Mac] Karabiner-Elements로 caps lock 한영 전환 딜레이 없애기

Mac의 caps lock은 영어의 대소문자 구분과 더불어 한영키 전환 기능을 갖고 있다. 문제는 하나의 버튼으로 두 개의 기능을 구현해야 하다 보니 기능 구분을 위해 한영 전환에 딜레이가 생겨 버렸다. 조금 더 길게 눌러야 한영 전환이 되는 것이다. 코딩할 때 너무 거슬려서 그 딜레이를 제거했다.

1) karabiner-Elements 설치

이 사이트로 이동해서 설치

2) caps lock 키 작업 없음 설정

맥 시스템 환경설정 - 키보드로 들어가 F1, F2 등의 키를 표준 기능 키로 사용 체크해준다.

해당 기능을 체크하면 f1, f2 버튼에 할당되어 있는 기능들은(화면 밝기 조절, 대시보드 등) 키보드 좌하단 fn 버튼을 함께 눌러야 사용이 가능해진다.

Karabiner 캡스 락 - Karabiner kaebseu lag

키보드 설정 화면 우하단에 있는 보조키를 클릭하고 Caps Lock 키작업 없음으로 설정한다.

Karabiner 캡스 락 - Karabiner kaebseu lag

이제 caps lock을 눌러도 아무런 반응이 없다.

3) karabiner 설정

Karabiner 캡스 락 - Karabiner kaebseu lag

From Keycaps_lock, To Key 에는 f9를 지정해준다. f9가 아니어도 된다. 평소에 사용하지 않는 키를 설정해주자.

Karabiner 캡스 락 - Karabiner kaebseu lag

Function keys 탭으로 넘어가 하단에 있는 Use all F1, F2, etc. keys as standard function keys반드시 체크해주자. 이게 안되어 있으면 딜레이 제거가 되지 않는다.

위 키는 아까 키보드 설정 창에서 설정한 F1, F2 등의 키를 표준 기능 키로 사용 과 같은 것이다.

여기까지 하면, 이제 caps lock을 누르면 f9가 눌린다.

이제 f9를 한영 전환키로 설정해주면 된다.

4) 한영전환키 설정

시스템 환경설정 - 키보드 - 단축키 - 입력 소스 로 들어가 입력 메뉴에서 다음 소스 선택 혹은 이전 입력 소스 선택f9 를 설정

Karabiner 캡스 락 - Karabiner kaebseu lag

끝! 이제 한영키가 빠르게 전환된다.

CapsLock

Make CapsLock Great Again!

中文文档 | EN DOCS | Karabiner Gallery | Github Repo | Import URL


CapsLock Enhancement Mac v3

Transform ⇪CapsLock into a powerful modifier ✱ Hyper that miraculously increases your work productivity!

Karabiner 캡스 락 - Karabiner kaebseu lag

Control Plane 0 Layout (There are 15 more!)


Highlights

  • Powerful: Transform Capslock into a great modifier: Hyper(✱). (such as ⇧⌃⌥⌘)
  • Useful: Navigation, mousekey, clipboard, win/term ctrl, shortcuts, etc... Redefine the keyboard!
  • Speed-Up: Optimized for developers, high-frequency move stay in hot zone.
  • Extensible: Work with existing modifiers, which introduce 16 extra control planes.
  • MouseKey: Manipulate mouse cursor and wheels with keyboard
  • Cross-Platform: MacOS and Windows. Light-Weight and portable

Karabiner 캡스 락 - Karabiner kaebseu lag


Features

  • Basic : Press ⇪ Capslock emit an ⎋ Escape. Hold it enabling the ✱ Hyper Modifier.
  • Navigation : Vim style navigation. Cursor move, text selection, switch desktop/window/tab, mouse move/wheel,etc...
  • Deletion : Maps BNM, to deletion operation to perform fast char/word/line deletion without hand move.
  • MouseKey : Maps keypad to fully functional mouse
  • Window : Close app/win/tab, Switch app/win/tab/desktop, integration with win-manager app such as Moom,Slate,Magnet
  • Application : Shortcuts for launching or switching frequently used applications
  • Terminal : Sending high-freq signals (Ctrl-Z, Ctrl-D, Ctrl-C) and vim/tmux prefix meta key via ✱
  • Clipboard : Turn numkeys into 10 different text clipboard. ✱⌘n copy and ✱n paste.
  • Shifter : Turn some keys into common code symbols.
  • Functional : Screenshtots. Fine-grained light/volume control. Take function keys' function back!

Karabiner 캡스 락 - Karabiner kaebseu lag


Install

It only takes two steps to enable Capslock on your Mac: Download & Enable

  1. Download

    Download & Install Karabiner-Elements.

    Following the wizard and grant required permissions (Settings - Security - Privacy)

  2. Enable

    Open this link with Safari. It will launch Karabiner-Elements and load configuration.

    karabiner://karabiner/assets/complex_modifications/import?url=https://raw.githubusercontent.com/Vonng/Capslock/master/mac_v3/capslock.json

    Alternative Links

    • Karabiner Gallery:https://ke-complex-modifications.pqrs.org/json/caps_lock_enhancement.json
    • GitHub Repo: https://raw.githubusercontent.com/Vonng/Capslock/master/mac_v3/capslock.json
    • Capslock Website: https://vonng.com/capslock.json
    • Or download capslock.json to ~/.config/karabiner/assets/complex_modifications/ manually.

    Click Enable All for Capslock Enhancement on pop-up dialog. It will affect immediately.

    You can now try moving cursor with ⇪ + h,j,k,l , And exploring more features below.


Usage

Capslock works on ANSI keyboards and similar layouts. It literally remaps every keys on the keyboard. Including 10 categories.

Karabiner 캡스 락 - Karabiner kaebseu lag

Control Planes are defined by combination of four extra left modifiers: ⌘⌥⌃⇧.This image shows the layout of control plane 0.

CategoryColorDescription
Basic Blue Press ⇪ Capslock emit an ⎋ Escape. Hold it enabling the ✱ Hyper Modifier.
Navigation Pink Vim style navigation. Cursor move, text selection, switch desktop/window/tab, mouse move/wheel,etc...
Deletion Brown Maps BNM, to deletion operation to perform fast char/word/line deletion without hand move.
MouseKey Keypad Maps keypad to fully functional mouse
Window Azure Close app/win/tab, Switch app/win/tab/desktop, intergration with win-manager app such as Moom,Slate,Magnet
Application Yellow Shortcuts for launching or switching frequently used applications
Terminal Green Sending high-freq signals (Ctrl-Z, Ctrl-D, Ctrl-C) and vim/tmux prefix meta key via ✱
Clipboard Purple Turn numkeys into 10 different text clipboard. ✱⌘n copy and ✱n paste.
Shifter Orange Turn some keys into common code symbols.
Functional Cyan Screenshtots. Fine-grained light/volume control. Take function keys' function back!

Basic

KeyMapsToComment
⇪ Press ⎋ Escape Click Capslock to emit Escape
⇪ Hold ✱ Hyper Hold Capslock to enable Hyper modifier.
✱⎋ ⇪ Capslock Press to switch Capslock status
✱␣ ⌃␣ Switch input source, +⌘ to emoji

Note that ✱ is implemented as combination of ALL RIGHT MODIFIERS: ⌘⌥⌃⇧.

Hold ✱ Hyper to enable hyper functionalities. We will assume and omit that in subsequent document.

Navigation

  • H, J, K, L, U, I, O, P are used as Navigators. Maps to ←↓↑→⇞↖↘⇟ by default. (pink area).
  • 9 control planes has already been allocated for navigators.
  • Hold additional ⌘ Command for selection. (like holding ⇧shift in normal), additional ⌥ Option for word/para selection.
  • Hold additional ⇧ Shift for app/win/tab switching. Hold additional ⌃ Control for desktop management .
  • Hold additional ⌥ Option for 🖱️ mouse move. Add ⇧shift to ⏫ accelerate. (U, I, O, P maps to mouse buttons) .
  • ⇧⌥ turns navigator to 🖲️ mouse wheel, and ⇧⌘ is the ⏫ accelerated version . HJKL for wheel, wihle UIOP for reversed wheel move.
FeatureMoveSelectWordSelWindowDesktop🖱️🖱️⏫🖲️🖲️⏫
Key\Mod ⌘⌥ ⇧⌥ ⇧⌃ ⇧⌘
H Left word left word left prev tab prev desk ⬅️ ⬅️⏫ ⬅️ ⬅️⏫
J Down line down 3 line down next app focus ⬇️ ⬇️⏫ ⬇️ ⬇️⏫
K Up line up 3 line up prev app expose all ⬆️ ⬆️⏫ ⬆️ ⬆️⏫
L Right word right word right next tab next desk ➡️ ➡️⏫ ➡️ ➡️⏫
U PgUp prev page prev page zoom- fullscreen 🖱️L 🖱️L ➡️ ➡️⏫
I Home line head end2head prev win hide 🖱️R 🖱️R ⬆️ ⬆️⏫
O End line end head2end next win hide all 🖱️B 🖱️B ⬇️ ⬇️⏫
P PgDn next page next page zoom+ Launchpad 🖱️F 🖱️F ⬅️ ⬅️⏫

Arrow Navigation

  • Arrows ←↓↑→ to 🖱️ mouse actions too. Hold ⌥ Option to ⏬ slow down, hold ⌘ Command to ⏫ speed up.
  • Hold ⇧ Shift turns to 🖲️ wheel move. Extra ⌥ Option to ⏬ slow down, extra ⌘ Command to ⏫ speed up.
  • ↩ Return maps to left click. And additional ⌘⌥⌃⇧ turns into right click, middle click, backward, forward.
Feature🖱️🖱️⏬🖱️⏫🖲️🖲️⏬🖲️⏫
Key\Mod ⇧⌥ ⇧⌘
←↓↑→ speed = 1600 speed ÷ 2 speed × 2 speed = 32 speed ÷ 2 speed × 2
🖱️L 🖱️M 🖱️R 🖱️L 🖱️B 🖱️F

Deletion

N M , . are used as Deletor keys. Right below the navigators for fast access (brown area).

Key\Mod
N del a word ahead del till line head del the whole line
M del a char ahead del a word ahead move line below
, del a char after del a word after move line above
. del a word after del till line end del the whole line
del file purge file

MouseKey

  • Turn Keypad into a fully funcional 🖱️ mouse.
  • Numbers maps to 8 direction 🖱️ mouse move. Hold ⌥ Option to ⏬ slow down, hold ⌘ Command to ⏫ speed up.
  • Hold additional ⇧ Shift turns to 🖲️ wheel move. Extra ⌥ Option to ⏬ slow down, and extra ⌘ Command to ⏫ speed up.
  • First line maps to wheel move and 0, ., ⌤, +, - maps to five mouse buttons.
⇭🖲️⬅️=🖲️⬇️/🖲️⬆️*🖲️ ➡️
7🖱️↖️ 8🖱️⬆️ 9🖱️↗️ -🖱️B
4🖱️⬅️ 5🖱️ 6🖱️➡️ +🖱️F
1🖱️↙️ 2🖱️⬇️ 3🖱️↘️
0🖱️L .🖱️M ⌤🖱️R

Window Control

  • Tab, Q, W, A, s used as window control keys. Focuing on close/switch applications / windows / tabs / desktops. (azure area)
  • Windows management (resize, layout) leaves to external application such as Moom, Magnet, and Slate. Bind ⌃⌥⇧⌘A manually.
Key\Mod
next app prev app switch desktop switch tab
Q close app close app Lock Screen Logout
W close tab close all win Display Sleep Sleep
A win app expose all show desktop LaunchPad
S next tab prev tab next win prev win

App Shortcuts

  • E R T Y F G are used as application shortcuts. (yellow area)
  • Popular apps and dev tools are registed to 3 default planes: ✱/⌘/⌥. Assign these shortcuts according to your own needs.
Key\Mod
E Safari Finder Mail
R iTerm2 Preview Terminal
T Visual Studio Code Typora Note
Y Siri Karabiner Amphetamine
F Alfred 4 Dash Dictionary
G Intellij IDEA Chrome Calender

Terminal Control

D, Z, X, C, V, B are used as terminal control keys. Sending singals and IDE commands. (green area)

Key\Mod
D ⌃D Ctrl+D (Send EOF) Define (Force touch)
Z ⌃Z Ctrl+Z (SIGTSTP) F5 (VS Code Debug)
X ⌃R Ctrl+R (IDE Run) ⌃F5 (VS Code Run)
C ⌃C Ctrl+C (SIGINT) ⇧>F5(VS Code Stop)
V ⌃VCtrl+V (Vim Prefix)
B ⌃BCtrl+B (Tmux Prefix)

Clipboard

Number keys 1, 2, …, 9, 0 are used as (text) clipboard. Hold ⌘ to copy, and press to paste. (purple area)

Key\Mod
1 Paste from clip 1 Copy to clip 1
2 Paste from clip 2 Copy to clip 2
…… …… ……
0 Paste from clip 0 Copy to clip 10

Shifter

  • Trivial transformation for misc characters. (orange area)
  • Some special tricks for developers. Such as ;' maps to := or != (⌘)
Key\Mod
- _ Zoom Out
= + Zoom In
[ ( { <
] ) } >
; ! :
' = =
/ ⌘/
\ ⌘/

Functional

  • Use F1,…F12 as standard functional keys, while hold ✱ Hyper to turn them back. (cyan area)

  • ⌘Command + F1 / F2 / F3 are used as desktop switcher. Enable shortcuts in system preference first:

    PreferenceKeyboardShortcutsMissionControl → Switch to Desktop 1/2/3

  • If you are using RMBP with Bar, consider changing your bar back to function keys with:

    Karabiner-ElementsFunction KeysUse all F1, F2, etc. keys as standard function keys

Key\ModComment
` ⌃⇧⌘4 ⇧⌘4 Area selection screenshot(⌘ to file)
F1 display_brightness_decrement | ⌃1 ⌃1 Brightness Down / Desktop 1
F2 display_brightness_increment | ⌃2 ⌃2 Brightness Up / Desktop 2
F3 ⌃↑ | ⌃3 ⌃3 Expose All / Desktop 3
F4 Launchpad Launchpad
F5 illumination_decrement Keyboard Light Down
F6 illumination_increment Keyboard Light Up
F7 rewind Music Prev
F8 play_or_pause Play / Pause
F9 fastforward Music Next
F10 mute Mute
F11 volume_decrement Volume Down
F12 volume_increment Volume Up
F13 ⌃⇧⌘3 ⇧⌘3 Full Screentshot (⌘ to file)
F14 ⇧⌘5 ⇧⌘6 Screenshot menu (⌘ touchbar snap)
F15 play_or_pause Play / Pause
Insert ⇧⌥ display_brightness_increment Fine-Grained Brightness Up
Delete ⌦ ⇧⌥ display_brightness_decrement Fine-Grained Brightness Down
Home ↖ ⇧⌥ illumination_increment Fine-GrainedKeyboard Light Up
End ↘ ⇧⌥ illumination_decrement Fine-Grained Keyboard Light Down
PgUp ⇞ ⇧⌥ volume_increment Fine-Grained Volume Up
PgDn ⇟ ⇧⌥ volume_decrement Fine-Grained Volume Down

References

Symbols

GlyphNameGlyphName
Capslock Hyper
Escape Space
Command (Mac) Alter (Win)
Option (Mac) Win (Win)
Control Shift
Return Enter
←↓↑→ Arrow Cursor ↖↘ Home/End
⇥⇤ Tab ⌫⌦ Delete / ForwardDelete
Numlock ⏫⏬ Fast / Slow
🖱️L Mouse Left Click (Button1) 🖱️B Mouse Backward (Button4)
🖱️R Mouse Right Click (Button2) 🖱️F Mouse Forward (Button5)
🖱️M Mouse Middle Click (Button3) 🖲️ Mouse Wheel

Control Planes

control planes
PlaneModifiersPlaneModifiersPlaneModifiers
0 3 ✱⌘⌥ 7 ✱⌘⌥⌃
1 ✱⌘ 5 ✱⌘⌃ 11 ✱⌘⌥⇧
2 ✱⌥ 6 ✱⌥⌃ 13 ✱⌘⌃⇧
4 ✱⌃ 9 ✱⌘⇧ 14 ✱⌥⌃⇧
8 ✱⇧ 10 ✱⌥⇧ 15 ✱⌘⌥⌃⇧
12 ✱⌃⇧

Version

  • Capslock Mac V3: 2021.03 - now (The Latest version)
  • Capslock Mac V2: 2017 - 2021
  • Capslock Mac V1: 2015 - 2017
  • Capslock Win: 2013 - 2015
MacOS SupportedWin Supported
MacOS Big Sur (11.0 ) Windows 10
MacOS Catalina (10.15) Windows 8
MacOS High Sierra (10.13) Windows 7
MacOS Sierra (10.12) Windows Vista
MacOS EI Capitan (10.11) Windows XP
MacOS Yosemite (10.10) or lower
(via Capslock Mac v1
(via Capslock Win)

MacOS v3 is actively maintained, available on MacOS 10.11 - 11.x. Yosemite (10.10) or lower are supported via Capslock Mac v1

Windows version is already archived. You can use pre-compiled binary or install AutoHotKey and load capslock.ahk manually


FAQ

Q: Why using ✱ as the symbol for Hyper?

A: Because the ASCII code for * is exactly 42, which is the ultimate answer to life, universe, and everything. ✱ (Heavy-Asterisk) is a pretty version of *.

Q: What's new in v3?

A: The original v2 only use 1 ~ 3 control planes. While v3 uses up to 9 control planes. A large number of functions have been added to make the additional modifier ⌘⌥⌃⇧ functioning in a reasonable way.

Q: Is there any incompatible changes in V3 compare to V2 ?

A: There are three minor incompatible changes:

  • F13/F4 from music prev/next to screenshot;

  • Number keys are used as clipboard instead of shifter

  • ⌘D now perform define(force touch) instead of opening dictionary app.

Q: Why is there no Linux OS support?

A: I'm using Linux through MacOS terminal. It actually feels much better than raw Linux 😆. This feature can be achieved via xmodmap, contribution are welcome!

Q: Why is there an older version in MacOS?

A: There was an older version of Karabiner that used XML config. Apple modified it's kernel architecture in MacOS Sierra (10.12) and many programs had to be overhauled. So then there was a new version of Karabiner, the Karabiner-Elements, which is still in use today.

Q: How can I customize it to my needs?

A: Just fork this repo and make modification to mac_v3/capslock.json according to documentation You can edit the more human-readable format mac_v3/capslock.yml then compile it into capslock.json format with make compile.

Q: Is this original?

A: I'm the first one to make a capslock overhaul schema as far as I know. The original win AHK version was wrote in 2013. The first mac version was wrote in 2015. It is the first capslock emulation schema in karabiner's gallery.


Feedbacks

Karabiner 캡스 락 - Karabiner kaebseu lag


About

Author: Vonng ()

License: Apache 2.0 License

Beian: 浙ICP备15016890-3号