Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rhee/1b93e9d32d978c62bfda67a24b3e54f9 to your computer and use it in GitHub Desktop.
Save rhee/1b93e9d32d978c62bfda67a24b3e54f9 to your computer and use it in GitHub Desktop.

mac os 맥에서 한영전환키를 shift-space 로 변경

mac os 맥에서 한영전환키를 shift-space 로 변경하기 위해 찾아본 몇 가지 자료 나중에 또 필요할 것 같아서 기록함.

'이전 입력 소스 선택'이 아니라 '입력 메뉴에서 다음 소스 선택' Command + Space 단축키를 할당해 주면 키에서 손가락을 땔 때 언어가 전환되는 것이 아니라, 단축키를 누르는 순간 바로 한영 전환이 이루어지기 때문에 훨씬 빠르고 경쾌하게 한영 전환을 할 수 있습니다.

프로퍼티 리스트 파일

~/Library/Preferences/com.apple.symbolichotkeys.plist

AppleSymbolicHotKeys > 61 > value > parameters > item 2 항목을 찾습니다. 참고로 해당 아이템의 원래 값은 1572864 이지만 앞서 블로그를 통해 소개해 드린 딜레이 없이 빠르게 OS X에서 한글-영어 입력기 전환하기 를 적용하신 경우라면 1048576 로 되어 있을 것입니다. 이 값을 131072 로 변경해줍니다. 쉼표는 넣어주지 말고 숫자만 넣어주십시오. 추후 단축키를 원상복구하려면 원래 키값을 적어넣어주시면 됩니다.

작업 내역을 저장한 후 OS X을 재부팅(혹윽 사용자 계정 로그아웃 후 재로그인)

com.apple.symbolichotkeys.plist 파일은 OS X 시스템 환경설정의 '키보드' preferencePane의 설정

'AppleSymbolicHotKeys > 61 > value > parameters > item 2' 부분에서 '61'은 '입력 메뉴에서 다음 소스 선택(Select the next source in the Input Menu)'에 해당하는 코드

참고 macworld.com 인터넷기록

Parameter 1, Paramater 2, Parameter 3 의 의미.

  • Parameter 1: ASCII code of the character (or 65535 - hex 0xFFFF - for non-ASCII characters).
  • Parameter 2: the keyboard key code for the character.
  • Parameter 3: the sum of the control, command, shift and option keys. these are bits 17-20 in binary:
    • shift is bit 17,
    • control is bit 18,
    • option is bit 19,
    • and command is bit 20.

Modifier 키의 Keycode는 다음과 같습니다.

  • Shift 키: 131072
  • Control 키: 262144
  • Option 키: 524288
  • Command 키: 1048576

참고 boredzo.org 인터넷기록

저장된 키코드 값을 텍스트 로 덤프

defaults read com.apple.symbolichotkeys > current.txt

table from archived hintsforums.macworld.com/showthread.php?t=114785

131072: Shift
262144: Control
524288: Option
1048576: Command

Add modifier values together in the 3rd parameter to combine them.

{ AppleSymbolicHotKeys = {

# Move focus to the menu bar - Control, F2
7 = { enabled = 1; value = { parameters = ( 65535, 120, 262144 ); type = standard; }; }; 

# Move focus to the Dock - Control, F3
8 = { enabled = 1; value = { parameters = ( 65535, 99, 262144 ); type = standard; }; }; 

# Move focus to active or next window - Control, F4
9 = { enabled = 1; value = { parameters = ( 65535, 118, 262144 ); type = standard; }; }; 

# Move focus to window toolbar - Control, F5
10 = { enabled = 1; value = { parameters = ( 65535, 96, 262144 ); type = standard; }; }; 

# Move focus to floating window - Control, F6
11 = { enabled = 1; value = { parameters = ( 65535, 97, 262144 ); type = standard; }; }; 

# ??? - Control, F1
12 = { enabled = 1; value = { parameters = ( 65535, 122, 262144 ); type = standard; }; }; 

# Change the way Tab moves focus - Control, F7
13 = { enabled = 1; value = { parameters = ( 65535, 98, 262144 ); type = standard; }; }; 

# Turn zoom on or off - Command, Option, 8
15 = { enabled = 1; value = { parameters = ( 56, 28, 1572864 ); type = standard; }; }; 

# Zoom in - Command, Option, =
17 = { enabled = 0; value = { parameters = ( 61, 24, 1572864 ); type = standard; }; }; 

# Zoom out - Command, Option, -
19 = { enabled = 0; value = { parameters = ( 45, 27, 1572864 ); type = standard; }; }; 

# Reverse Black and White - Command, Control, Option, 8
21 = { enabled = 1; value = { parameters = ( 56, 28, 1835008 ); type = standard; }; }; 

# Turn image smoothing on or off - Command, Option, \
23 = { enabled = 0; value = { parameters = ( 92, 42, 1572864 ); type = standard; }; }; 

# Increase Contrast - Command, Control, Option, .
25 = { enabled = 1; value = { parameters = ( 46, 47, 1835008 ); type = standard; }; }; 

# Decrease Contrast - Command, Control, Option, ','
26 = { enabled = 1; value = { parameters = ( 44, 43, 1835008 ); type = standard; }; }; 

# Move focus to the next window in application - Command, backtic
27 = { enabled = 1; value = { parameters = ( 96, 50, 1048576 ); type = standard; }; }; 

# Save picture of screen as file - Command, Shift, 3
28 = { enabled = 1; value = { parameters = ( 51, 20, 1179648 ); type = standard; }; }; 

# Copy picture of screen to clipboard - Command, Control, Shift, 3
29 = { enabled = 1; value = { parameters = ( 51, 20, 1441792 ); type = standard; }; }; 

# Save picture of selected area as file - Command, Shift, 4
30 = { enabled = 1; value = { parameters = ( 52, 21, 1179648 ); type = standard; }; }; 

# Copy picture of selected area to clipboard - Command, Control, Shift, 4
31 = { enabled = 1; value = { parameters = ( 52, 21, 1441792 ); type = standard; }; }; 

# All Windows - F9
32 = { enabled = 1; value = { parameters = ( 65535, 101, 0 ); type = standard; }; }; 

# Application Windows - F10
33 = { enabled = 1; value = { parameters = ( 65535, 109, 0 ); type = standard; }; }; 

# All Windows (Slow) - F9
34 = { enabled = 1; value = { parameters = ( 65535, 101, 131072 ); type = standard; }; }; 

# Application Windows (Slow) - F10
35 = { enabled = 1; value = { parameters = ( 65535, 109, 131072 ); type = standard; }; }; 

# Desktop - F11
36 = { enabled = 1; value = { parameters = ( 65535, 103, 0 ); type = standard; }; }; 

# Desktop (Slow) - F11
37 = { enabled = 1; value = { parameters = ( 65535, 103, 131072 ); type = standard; }; }; 

# ??? - Command, Option, T
50 = { enabled = 1; value = { parameters = ( 116, 17, 1572864 ); type = standard; }; }; 

# Move focus to the window drawer - Command, Option, quote
51 = { enabled = 1; value = { parameters = ( 39, 50, 1572864 ); type = standard; }; }; 

# Turn Dock Hiding On/Off - Command, Option, D
52 = { enabled = 1; value = { parameters = ( 100, 2, 1572864 ); type = standard; }; }; 

# ??? - F14
53 = { enabled = 1; value = { parameters = ( 65535, 107, 0 ); type = standard; }; }; 

# ??? - F15
54 = { enabled = 1; value = { parameters = ( 65535, 113, 0 ); type = standard; }; }; 

# ??? - Option, F14
55 = { enabled = 1; value = { parameters = ( 65535, 107, 524288 ); type = standard; }; }; 

# ??? - Option, F15
56 = { enabled = 1; value = { parameters = ( 65535, 113, 524288 ); type = standard; }; }; 

# Move focus to the status menus - Control, F8
57 = { enabled = 1; value = { parameters = ( 65535, 100, 262144 ); type = standard; }; }; 

# Turn VoiceOver on / off - Command, F5
59 = { enabled = 1; value = { parameters = ( 65535, 96, 1048576 ); type = standard; }; }; 

# Select the previous input source - Command, Option, Space
60 = { enabled = 1; value = { parameters = ( 32, 49, 1572864 ); type = standard; }; }; 

# Select the next source in the Input Menu - Command, Option, Shift, Space
61 = { enabled = 1; value = { parameters = ( 32, 49, 1703936 ); type = standard; }; }; 

# Dashboard - F12
62 = { enabled = 1; value = { parameters = ( 65535, 111, 0 ); type = standard; }; }; 

# Dashboard (Slow) - F12
63 = { enabled = 1; value = { parameters = ( 65535, 111, 131072 ); type = standard; }; }; 

# Show Spotlight search field - Command, Shift, Space
64 = { enabled = 1; value = { parameters = ( 65535, 49, 1179648 ); type = standard; }; }; 

# Show Spotlight window - Control, Shift, Space
65 = { enabled = 1; value = { parameters = ( 65535, 49, 393216 ); type = standard; }; }; 

# Dictionary MouseOver - Command, Shift, E
70 = { enabled = 1; value = { parameters = ( 101, 2, 1179648 ); type = standard; }; }; 

# Hide and show Front Row - Command, Esc
73 = { enabled = 1; value = { parameters = ( 65535, 53, 1048576 ); type = standard; }; }; 

# Activate Spaces - F8
75 = { enabled = 1; value = { parameters = ( 65535, 100, 0 ); type = standard; }; }; 

# Activate Spaces (Slow) - Shift, F8
76 = { enabled = 1; value = { parameters = ( 65535, 100, 131072 ); type = standard; }; }; 

# Spaces Left - Control, Left
79 = { enabled = 1; value = { parameters = ( 65535, 123, 262144 ); type = standard; }; }; 

# Spaces Right - Control, Right
81 = { enabled = 1; value = { parameters = ( 65535, 124, 262144 ); type = standard; }; }; 

# Spaces Down - Control, Down
83 = { enabled = 1; value = { parameters = ( 65535, 125, 262144 ); type = standard; }; }; 

# Spaces Up - Control, Up
85 = { enabled = 1; value = { parameters = ( 65535, 126, 262144 ); type = standard; }; }; 

# Show Help Menu - Command, Shift, /
91 = { enabled = 0; };
92 = { enabled = 0; };
98 = { enabled = 0; value = { parameters = ( 47, 44, 1179648 ); type = standard; }; }; 

# Switch to Space 1 - Control, 1
118 = { enabled = 1; value = { parameters = ( 65535, 18, 262144 ); type = standard; }; }; 

# Switch to Space 2 - Control, 2
119 = { enabled = 1; value = { parameters = ( 65535, 19, 262144 ); type = standard; }; }; 

# Switch to Space 3 - Control, 3
120 = { enabled = 1; value = { parameters = ( 65535, 20, 262144 ); type = standard; }; }; 

# Switch to Space 4 - Control, 4
121 = { enabled = 1; value = { parameters = ( 65535, 21, 262144 ); type = standard; }; }; 

122 = { enabled = 0; };
123 = { enabled = 0; };
124 = { enabled = 0; };
125 = { enabled = 0; };
126 = { enabled = 0; };
127 = { enabled = 0; };
128 = { enabled = 0; };
129 = { enabled = 0; };
130 = { enabled = 0; };
131 = { enabled = 0; };
132 = { enabled = 0; };
133 = { enabled = 0; };
134 = { enabled = 0; };
135 = { enabled = 0; };
136 = { enabled = 0; };
137 = { enabled = 0; };
138 = { enabled = 0; };
139 = { enabled = 0; };
140 = { enabled = 0; };
141 = { enabled = 0; };
142 = { enabled = 0; };
143 = { enabled = 0; };
144 = { enabled = 0; };
145 = { enabled = 0; };
146 = { enabled = 0; };
147 = { enabled = 0; };
148 = { enabled = 0; };
149 = { enabled = 0; };
}; }

OS X 10.11 El Capitan 에서 입력소스 전환이 ctrl-space 로 변경됨. com.apple.symbolichotkeys.plist 수정시 참고. 미리 command-space 로 변경 한 후에 적용하면 헷갈리지 않을것임.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment