2016년 5월 17일 화요일

맥(os x) 키배열 변경 (hhkb style) 및 방향키 변경

1. karabiner 를 통해서 vi 방식인 hjkl 로 변경




-> 손적응이 쉽지 않아 다음 방법으로 변경


2. fn + ijkl 방식으로 변경

vi mode  방식보다는 편했지만...





뭔가 불편해서 좀더 나은 방법을 검색


3. custom setting  (ctrl + ijkl)



키코드 확인
Misc & Uninstall > Helper Applications > Launch EventViewer

커스텀 셋팅
Misc & Uninstall > Custom Setting : Open private.xml

셋팅값






  Control ijkl
  test
  __KeyToKey__KeyCode::RawValue::0x22, ModifierFlag::CONTROL_L, KeyCode::CURSOR_UP
  __KeyToKey__KeyCode::RawValue::0x26, ModifierFlag::CONTROL_L, KeyCode::CURSOR_LEFT
  __KeyToKey__KeyCode::RawValue::0x28, ModifierFlag::CONTROL_L, KeyCode::CURSOR_DOWN
  __KeyToKey__KeyCode::RawValue::0x25, ModifierFlag::CONTROL_L, KeyCode::CURSOR_RIGHT



가장 편하긴 하지만.. intellij 단축키와 중복되는 경우가 생김


4. custom setting (hhkb type, shift_r + [ ; ' / )


조금 불편하지만 해피해킹과 유사하다는 장점




  hhkb type
  test
  __KeyToKey__KeyCode::RawValue::0x21, ModifierFlag::SHIFT_R, KeyCode::CURSOR_UP
  __KeyToKey__KeyCode::RawValue::0x29, ModifierFlag::SHIFT_R, KeyCode::CURSOR_LEFT
  __KeyToKey__KeyCode::RawValue::0x2c, ModifierFlag::SHIFT_R, KeyCode::CURSOR_DOWN
  __KeyToKey__KeyCode::RawValue::0x27, ModifierFlag::SHIFT_R, KeyCode::CURSOR_RIGHT

  __KeyToKey__KeyCode::RawValue::0x28, ModifierFlag::SHIFT_R, KeyCode::HOME
  __KeyToKey__KeyCode::RawValue::0x2b, ModifierFlag::SHIFT_R, KeyCode::END

  __KeyToKey__KeyCode::RawValue::0x25, ModifierFlag::SHIFT_R, KeyCode::PAGEUP
  __KeyToKey__KeyCode::RawValue::0x2f, ModifierFlag::SHIFT_R, KeyCode::PAGEDOWN




5. 현재 사용하고 있는 setting

control + ikjl (상하좌우)
control + uo (pageup, pagedown)
control + hn (home, end)

control + ikjl uo hn 키는 control + fn + ikjl uo hn 키로 변경

karabiner 에서 다중키입력 변환(치환) 방법
https://pqrs.org/osx/karabiner/xml.html.en



------------- private.xml ---------------





  ikjl type
  test



 
    __KeyToKey__
    KeyCode::I,ModifierFlag::CONTROL_L | ModifierFlag::FN,
    KeyCode::I,ModifierFlag::CONTROL_L
 
 
    __KeyToKey__
    KeyCode::K,ModifierFlag::CONTROL_L | ModifierFlag:: FN,
    KeyCode::K,ModifierFlag::CONTROL_L
 
 
    __KeyToKey__
    KeyCode::J,ModifierFlag::CONTROL_L | ModifierFlag:: FN,
    KeyCode::J,ModifierFlag::CONTROL_L
 
 
    __KeyToKey__
    KeyCode::L,ModifierFlag::CONTROL_L | ModifierFlag::FN,
    KeyCode::L,ModifierFlag::CONTROL_L
 
 
    __KeyToKey__
    KeyCode::U,ModifierFlag::CONTROL_L | ModifierFlag::FN,
    KeyCode::U,ModifierFlag::CONTROL_L
 
 
    __KeyToKey__
    KeyCode::O,ModifierFlag::CONTROL_L | ModifierFlag::FN,
    KeyCode::O,ModifierFlag::CONTROL_L
 
 
    __KeyToKey__
    KeyCode::H,ModifierFlag::CONTROL_L | ModifierFlag::FN,
    KeyCode::H,ModifierFlag::CONTROL_L
 
 
    __KeyToKey__
    KeyCode::N,ModifierFlag::CONTROL_L | ModifierFlag::FN,
    KeyCode::N,ModifierFlag::CONTROL_L
 

  __KeyToKey__KeyCode::RawValue::0x22, ModifierFlag::CONTROL_L, KeyCode::CURSOR_UP
  __KeyToKey__KeyCode::RawValue::0x26, ModifierFlag::CONTROL_L, KeyCode::CURSOR_LEFT
  __KeyToKey__KeyCode::RawValue::0x28, ModifierFlag::CONTROL_L, KeyCode::CURSOR_DOWN
  __KeyToKey__KeyCode::RawValue::0x25, ModifierFlag::CONTROL_L, KeyCode::CURSOR_RIGHT

  __KeyToKey__KeyCode::RawValue::0x4, ModifierFlag::CONTROL_L, KeyCode::HOME
  __KeyToKey__KeyCode::RawValue::0x2d, ModifierFlag::CONTROL_L, KeyCode::END
  __KeyToKey__KeyCode::RawValue::0x20, ModifierFlag::CONTROL_L, KeyCode::PAGEUP
  __KeyToKey__KeyCode::RawValue::0x1f, ModifierFlag::CONTROL_L, KeyCode::PAGEDOWN


---- fn 위치 추가

ijkm + fn type
test


__KeyToKey__KeyCode::COMMAND_R, KeyCode::FN

__KeyToKey__KeyCode::CONTROL_L, ModifierFlag:: FN, KeyCode::CAPSLOCK


__KeyToKey__KeyCode::RawValue::0x22, ModifierFlag::FN, KeyCode::CURSOR_UP
__KeyToKey__KeyCode::RawValue::0x26, ModifierFlag::FN, KeyCode::CURSOR_LEFT
__KeyToKey__KeyCode::RawValue::0x28, ModifierFlag::FN, KeyCode:: CURSOR_RIGHT
__KeyToKey__KeyCode::RawValue::0x2e, ModifierFlag::FN, KeyCode::CURSOR_DOWN

__KeyToKey__KeyCode::RawValue::0x4, ModifierFlag::FN, KeyCode::HOME
__KeyToKey__KeyCode::RawValue::0x2d, ModifierFlag::FN, KeyCode::END
__KeyToKey__KeyCode::RawValue::0x20, ModifierFlag::FN, KeyCode::PAGEUP
__KeyToKey__KeyCode::RawValue::0x1f, ModifierFlag::FN, KeyCode::PAGEDOWN



------- 2016.06 현재 적용 코드



f1~f12 function 키 = 숫자키 + 우측 option   조합 추가등 hhkb 배열 추가



<?xml version="1.0"?>
<root>
 <item>
  <name>HHKB type</name>
  <identifier>test</identifier>


  <autogen>__KeyToKey__KeyCode::TAB, ModifierFlag:: COMMAND_R, KeyCode::CAPSLOCK</autogen>


  <autogen>__KeyToKey__KeyCode::BRACKET_LEFT, ModifierFlag::OPTION_R, KeyCode::CURSOR_UP</autogen>
  <autogen>__KeyToKey__KeyCode::SEMICOLON, ModifierFlag::OPTION_R, KeyCode::CURSOR_LEFT</autogen>
  <autogen>__KeyToKey__KeyCode::QUOTE, ModifierFlag::OPTION_R, KeyCode:: CURSOR_RIGHT</autogen>
  <autogen>__KeyToKey__KeyCode::SLASH, ModifierFlag::OPTION_R, KeyCode::CURSOR_DOWN</autogen>

  <autogen>__KeyToKey__KeyCode::K, ModifierFlag::OPTION_R, KeyCode::HOME</autogen>
  <autogen>__KeyToKey__KeyCode::COMMA, ModifierFlag::OPTION_R, KeyCode::END</autogen>
  <autogen>__KeyToKey__KeyCode::L, ModifierFlag::OPTION_R, KeyCode::PAGEUP</autogen>
  <autogen>__KeyToKey__KeyCode::DOT, ModifierFlag::OPTION_R, KeyCode::PAGEDOWN</autogen>

  <autogen>__KeyToKey__KeyCode::DELETE, ModifierFlag::OPTION_R, KeyCode::FORWARD_DELETE</autogen>

  <autogen>__KeyToKey__KeyCode::1, ModifierFlag::OPTION_R, KeyCode::F1</autogen>
  <autogen>__KeyToKey__KeyCode::2, ModifierFlag::OPTION_R, KeyCode::F2</autogen>
  <autogen>__KeyToKey__KeyCode::3, ModifierFlag::OPTION_R, KeyCode::F3</autogen>
  <autogen>__KeyToKey__KeyCode::4, ModifierFlag::OPTION_R, KeyCode::F4</autogen>
  <autogen>__KeyToKey__KeyCode::5, ModifierFlag::OPTION_R, KeyCode::F5</autogen>
  <autogen>__KeyToKey__KeyCode::6, ModifierFlag::OPTION_R, KeyCode::F6</autogen>
  <autogen>__KeyToKey__KeyCode::7, ModifierFlag::OPTION_R, KeyCode::F7</autogen>
  <autogen>__KeyToKey__KeyCode::8, ModifierFlag::OPTION_R, KeyCode::F8</autogen>
  <autogen>__KeyToKey__KeyCode::9, ModifierFlag::OPTION_R, KeyCode::F9</autogen>
  <autogen>__KeyToKey__KeyCode::0, ModifierFlag::OPTION_R, KeyCode::F10</autogen>
  <autogen>__KeyToKey__KeyCode::MINUS, ModifierFlag::OPTION_R, KeyCode::F11</autogen>
  <autogen>__KeyToKey__KeyCode::EQUAL, ModifierFlag::OPTION_R, KeyCode::F12</autogen>
  <autogen>__KeyToKey__KeyCode::BACKQUOTE, ModifierFlag::OPTION_R, KeyCode::ESCAPE</autogen>

------- 2016.08 단축키 추가 (context menu key 추가) 마우스 우클릭 기능

  <autogen>__KeyToKey__ KeyCode::RETURN, ModifierFlag::OPTION_R, PointingButton::RIGHT</autogen>

</item>
</root>



----------- 2017.11 hhkb 를 위한 설정
esc 와 backquote 키 swap 에 따른 설정 (설정 순서 중요)


<?xml version="1.0"?>
<root>
<item>
<name>HHKB type</name>
<identifier>test</identifier>

<autogen>__KeyToKey__KeyCode::BACKQUOTE, ModifierFlag::COMMAND_R, ConsumerKeyCode::POWER</autogen>
<autogen>__KeyToKey__KeyCode::ESCAPE, ModifierFlag::COMMAND_R, KeyCode::ESCAPE</autogen>



<autogen>__KeyToKey__KeyCode::TAB, ModifierFlag:: COMMAND_R, KeyCode::CAPSLOCK</autogen>

<autogen>__KeyToKey__KeyCode::U, ModifierFlag::COMMAND_R, KeyCode::HOME</autogen>
<autogen>__KeyToKey__KeyCode::I, ModifierFlag::COMMAND_R, KeyCode::END</autogen>
<autogen>__KeyToKey__KeyCode::COMMA, ModifierFlag::COMMAND_R, KeyCode::PAGEUP</autogen>
<autogen>__KeyToKey__KeyCode::M, ModifierFlag::COMMAND_R, KeyCode::PAGEDOWN</autogen>

<autogen>__KeyToKey__KeyCode::BACKQUOTE, KeyCode::ESCAPE</autogen>  
<autogen>__KeyToKey__KeyCode::ESCAPE, KeyCode::BACKQUOTE</autogen>


<autogen>__KeyToKey__KeyCode::1, ModifierFlag::COMMAND_R, KeyCode::F1</autogen>
<autogen>__KeyToKey__KeyCode::2, ModifierFlag::COMMAND_R, KeyCode::F2</autogen>
<autogen>__KeyToKey__KeyCode::3, ModifierFlag::COMMAND_R, KeyCode::F3</autogen>
<autogen>__KeyToKey__KeyCode::4, ModifierFlag::COMMAND_R, KeyCode::F4</autogen>
<autogen>__KeyToKey__KeyCode::5, ModifierFlag::COMMAND_R, KeyCode::F5</autogen>
<autogen>__KeyToKey__KeyCode::6, ModifierFlag::COMMAND_R, KeyCode::F6</autogen>
<autogen>__KeyToKey__KeyCode::7, ModifierFlag::COMMAND_R, KeyCode::F7</autogen>
<autogen>__KeyToKey__KeyCode::8, ModifierFlag::COMMAND_R, KeyCode::F8</autogen>
<autogen>__KeyToKey__KeyCode::9, ModifierFlag::COMMAND_R, KeyCode::F9</autogen>
<autogen>__KeyToKey__KeyCode::0, ModifierFlag::COMMAND_R, KeyCode::F10</autogen>
<autogen>__KeyToKey__KeyCode::MINUS, ModifierFlag::COMMAND_R, KeyCode::F11</autogen>
<autogen>__KeyToKey__KeyCode::EQUAL, ModifierFlag::COMMAND_R, KeyCode::F12</autogen>
<autogen>__KeyToKey__KeyCode::DELETE, ModifierFlag:: COMMAND_R, KeyCode::FORWARD_DELETE</autogen>
<autogen>__KeyToKey__ KeyCode::RETURN, ModifierFlag::COMMAND_R, PointingButton::RIGHT</autogen>

</item>
</root>



--- 2017.11 hhkb media 키 추가 및 macbook type 추가




<?xml version="1.0"?>
<root>
<item>
<name>HHKB type</name>
<identifier>hhkb</identifier>

<autogen>__KeyToKey__KeyCode::BACKQUOTE, ModifierFlag::COMMAND_R, ConsumerKeyCode::POWER</autogen>
<autogen>__KeyToKey__KeyCode::ESCAPE, ModifierFlag::COMMAND_R, KeyCode::ESCAPE</autogen>



<autogen>__KeyToKey__KeyCode::TAB, ModifierFlag:: COMMAND_R, KeyCode::CAPSLOCK</autogen>

<autogen>__KeyToKey__KeyCode::U, ModifierFlag::COMMAND_R, KeyCode::HOME</autogen>
<autogen>__KeyToKey__KeyCode::I, ModifierFlag::COMMAND_R, KeyCode::END</autogen>
<autogen>__KeyToKey__KeyCode::COMMA, ModifierFlag::COMMAND_R, KeyCode::PAGEUP</autogen>
<autogen>__KeyToKey__KeyCode::M, ModifierFlag::COMMAND_R, KeyCode::PAGEDOWN</autogen>

<autogen>__KeyToKey__KeyCode::BACKQUOTE, KeyCode::ESCAPE</autogen>  
<autogen>__KeyToKey__KeyCode::ESCAPE, KeyCode::BACKQUOTE</autogen>


<autogen>__KeyToKey__KeyCode::1, ModifierFlag::COMMAND_R, KeyCode::F1</autogen>
<autogen>__KeyToKey__KeyCode::2, ModifierFlag::COMMAND_R, KeyCode::F2</autogen>
<autogen>__KeyToKey__KeyCode::3, ModifierFlag::COMMAND_R, KeyCode::F3</autogen>
<autogen>__KeyToKey__KeyCode::4, ModifierFlag::COMMAND_R, KeyCode::F4</autogen>
<autogen>__KeyToKey__KeyCode::5, ModifierFlag::COMMAND_R, KeyCode::F5</autogen>
<autogen>__KeyToKey__KeyCode::6, ModifierFlag::COMMAND_R, KeyCode::F6</autogen>
<autogen>__KeyToKey__KeyCode::7, ModifierFlag::COMMAND_R, KeyCode::F7</autogen>
<autogen>__KeyToKey__KeyCode::8, ModifierFlag::COMMAND_R, KeyCode::F8</autogen>
<autogen>__KeyToKey__KeyCode::9, ModifierFlag::COMMAND_R, KeyCode::F9</autogen>
<autogen>__KeyToKey__KeyCode::0, ModifierFlag::COMMAND_R, KeyCode::F10</autogen>
<autogen>__KeyToKey__KeyCode::MINUS, ModifierFlag::COMMAND_R, KeyCode::F11</autogen>
<autogen>__KeyToKey__KeyCode::EQUAL, ModifierFlag::COMMAND_R, KeyCode::F12</autogen>
<autogen>__KeyToKey__KeyCode::DELETE, ModifierFlag:: COMMAND_R, KeyCode::FORWARD_DELETE</autogen>
<autogen>__KeyToKey__ KeyCode::RETURN, ModifierFlag::COMMAND_R, PointingButton::RIGHT</autogen>
<autogen>__KeyToKey__ KeyCode::RawValue::0x5a, ConsumerKeyCode::MUSIC_PLAY </autogen>
<autogen>__KeyToKey__ KeyCode::F13, ModifierFlag::SHIFT_L, ConsumerKeyCode::MUSIC_PREV</autogen>
<autogen>__KeyToKey__ KeyCode::F13, ModifierFlag::SHIFT_R, ConsumerKeyCode::MUSIC_PREV</autogen>
<autogen>__KeyToKey__ KeyCode::F13, ConsumerKeyCode::MUSIC_NEXT</autogen>
</item>

<item>
<name>mac type</name>
<identifier>mac</identifier>

<autogen>__KeyToKey__KeyCode::BACKQUOTE, ModifierFlag::COMMAND_R, KeyCode::ESCAPE</autogen>
<autogen>__KeyToKey__KeyCode::TAB, ModifierFlag:: COMMAND_R, KeyCode::CAPSLOCK</autogen>

<autogen>__KeyToKey__KeyCode::U, ModifierFlag::COMMAND_R, KeyCode::HOME</autogen>
<autogen>__KeyToKey__KeyCode::I, ModifierFlag::COMMAND_R, KeyCode::END</autogen>
<autogen>__KeyToKey__KeyCode::COMMA, ModifierFlag::COMMAND_R, KeyCode::PAGEUP</autogen>
<autogen>__KeyToKey__KeyCode::M, ModifierFlag::COMMAND_R, KeyCode::PAGEDOWN</autogen>

<autogen>__KeyToKey__KeyCode::1, ModifierFlag::COMMAND_R, KeyCode::F1</autogen>
<autogen>__KeyToKey__KeyCode::2, ModifierFlag::COMMAND_R, KeyCode::F2</autogen>
<autogen>__KeyToKey__KeyCode::3, ModifierFlag::COMMAND_R, KeyCode::F3</autogen>
<autogen>__KeyToKey__KeyCode::4, ModifierFlag::COMMAND_R, KeyCode::F4</autogen>
<autogen>__KeyToKey__KeyCode::5, ModifierFlag::COMMAND_R, KeyCode::F5</autogen>
<autogen>__KeyToKey__KeyCode::6, ModifierFlag::COMMAND_R, KeyCode::F6</autogen>
<autogen>__KeyToKey__KeyCode::7, ModifierFlag::COMMAND_R, KeyCode::F7</autogen>
<autogen>__KeyToKey__KeyCode::8, ModifierFlag::COMMAND_R, KeyCode::F8</autogen>
<autogen>__KeyToKey__KeyCode::9, ModifierFlag::COMMAND_R, KeyCode::F9</autogen>
<autogen>__KeyToKey__KeyCode::0, ModifierFlag::COMMAND_R, KeyCode::F10</autogen>
<autogen>__KeyToKey__KeyCode::MINUS, ModifierFlag::COMMAND_R, KeyCode::F11</autogen>
<autogen>__KeyToKey__KeyCode::EQUAL, ModifierFlag::COMMAND_R, KeyCode::F12</autogen>
<autogen>__KeyToKey__KeyCode::BACKSLASH, ModifierFlag:: COMMAND_R, KeyCode::FORWARD_DELETE</autogen>
<autogen>__KeyToKey__ KeyCode::RETURN, ModifierFlag::COMMAND_R, PointingButton::RIGHT</autogen>
</item>
</root>

댓글 없음:

댓글 쓰기

Intelij 설정 및 plugin

1. preferences... (settings...) Appearance & Behavior > Appearance - Window Options        ✓   Show memory indicator Editor &...