레이블이 Setting인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Setting인 게시물을 표시합니다. 모든 게시물 표시

2018년 10월 10일 수요일

리눅스 키보드 xkbcomp 설정

1. Right Alt, Right Ctrl 에 대한 한/영, 한자 키 매핑에 대한 심볼 선언

※ Ubuntu 에서는 /usr/share/X11/xkb/symbols/kr 에 이미 정의되어 있음

partial function_keys
xkb_symbols "ralt_hangul" {
    replace key <RALT> {
        type[Group1] = "ONE_LEVEL",
        symbols[Group1]= [ Hangul ]
    };
};

partial function_keys
xkb_symbols "rctrl_hangul" {
    replace key <RCTL> {
        type[Group1] = "ONE_LEVEL",
        symbols[Group1]= [ Hangul ]
    };
};

partial function_keys
xkb_symbols "ralt_hanja" {
    replace key <RALT> {
        type[Group1] = "ONE_LEVEL",
        symbols[Group1]= [ Hangul_Hanja ]
    };
};

partial function_keys
xkb_symbols "rctrl_hanja" {
    replace key <RCTL> {
        type[Group1] = "ONE_LEVEL",
        symbols[Group1]= [ Hangul_Hanja ]
    };

};


2. 키 매핑 설정

※ 여기서는 /usr/local/etc/.xkbcompusr.xkb 파일에 저장

xkb_keymap {
xkb_keycodes  { include "evdev+aliases(qwerty)" };
xkb_types     { include "complete" };
xkb_compat    { include "complete" };
xkb_symbols   { include "pc+us+inet(evdev)+terminate(ctrl_alt_bksp)+kr(ralt_hangul)+kr(rctrl_hanja)" };
xkb_geometry  { include "pc(pc105)" };

};


3. 시작시 매번 로딩

xkbcomp /usr/local/etc/.xkbcompusr.xkb $DISPLAY

Fontconfig

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <!-- workaround for wrong style and weight -->
  <match target="pattern">
    <test qual="any" name="family">
      <string>Ubuntu Mono</string>
    </test>
    <edit mode="append" binding="strong" name="family" >
      <string>D2Coding</string>
    </edit>
  </match>
  <match target="font">
    <test name="family">
      <string>NanumGothic</string>
    </test>
    <edit name="hinting">
      <bool>true</bool>
    </edit>
    <edit name="hintstyle" mode="assign">
      <const>hintfull</const>
    </edit>
  </match>
  <match target="font">
    <test name="family">
      <string>DejaVu Sans Mono</string>
    </test>
    <edit name="hinting">
      <bool>true</bool>
    </edit>
    <edit name="hintstyle" mode="assign">
      <const>hintslight</const>
    </edit>
  </match>
  <match target="font">
    <test name="family">
      <string>Consolas</string>
    </test>
    <edit name="hinting">
      <bool>true</bool>
    </edit>
    <edit name="hintstyle" mode="assign">
      <const>hintslight</const>
      <!--const>hintfull</const-->
    </edit>
    <edit name="pixelsize" mode="assign">
      <plus><name>pixelsize</name>, <double>2.0</double></plus>
    </edit>
  </match>
  <match target="font">
    <test name="family">
      <string>Ubuntu Mono</string>
    </test>
    <edit name="hinting">
      <bool>true</bool>
    </edit>
    <edit name="hintstyle" mode="assign">
      <const>hintfull</const>
    </edit>
    <edit name="pixelsize" mode="assign">
      <plus><name>pixelsize</name>, <double>2.0</double></plus>
    </edit>
  </match>
</fontconfig>

2017년 6월 20일 화요일

2016년 2월 12일 금요일

한글 입력기 fcitx 설정

1. 설치

add-apt-repository ppa:createsc/3beol
apt-get update
apt-get install fcitx fcitx-mozc fcitx-hangul fcitx-libs-qt5 fcitx-frontend-qt5
                        fcitx-frontend-gtk2 fcitx-frontend-gtk3 fcitx-config-gtk fcitx-ui-classic


2. 키보드 입력기 설정 변경

im-config 실행하여 fcitx 로 변경

2016년 1월 19일 화요일

리눅스 키보드 xmodmap 설정

1. xev 사용하여 Key Code 알아내기

※ Key Code 는 시스템에 따라 다를 수 있다.

(1) 우측 Alt Key

KeyPress event, serial 40, synthetic NO, window 0x6400001,
    root 0xe7, subw 0x0, time 23413094, (666,16), root:(2590,849),
    state 0x0, keycode 108 (keysym 0xff31, Hangul), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x6400001,
    root 0xe7, subw 0x0, time 23413166, (666,16), root:(2590,849),
    state 0x8, keycode 108 (keysym 0xff31, Hangul), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False


(2) 우측 Ctrl Key

KeyPress event, serial 40, synthetic NO, window 0x6400001,
    root 0xe7, subw 0x0, time 23414782, (666,16), root:(2590,849),
    state 0x0, keycode 105 (keysym 0xff34, Hangul_Hanja), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x6400001,
    root 0xe7, subw 0x0, time 23414870, (666,16), root:(2590,849),
    state 0x4, keycode 105 (keysym 0xff34, Hangul_Hanja), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False


(3) CapsLock Key

KeyPress event, serial 40, synthetic NO, window 0x6400001,
    root 0xe7, subw 0x0, time 23418342, (666,16), root:(2590,849),
    state 0x0, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
    XKeysymToKeycode returns keycode: 37
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x6400001,
    root 0xe7, subw 0x0, time 23418438, (666,16), root:(2590,849),
    state 0x4, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
    XKeysymToKeycode returns keycode: 37
    XLookupString gives 0 bytes:
    XFilterEvent returns: False


(4) Window Key

KeyPress event, serial 40, synthetic NO, window 0x6400001,
    root 0xe7, subw 0x0, time 23422646, (666,16), root:(2590,849),
    state 0x0, keycode 133 (keysym 0xff67, Menu), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x6400001,
    root 0xe7, subw 0x0, time 23422734, (666,16), root:(2590,849),
    state 0x40, keycode 133 (keysym 0xff67, Menu), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False


2. 우측 Alt Key 를 한글 Key 로 설정

xmodmap -e "remove mod1 = Alt_R"
xmodmap -e "keycode 108 = Hangul"


3. 우측 Ctrl Key 를 한자 Key로 설정

xmodmap -e "remove control = Control_R"
xmodmap -e "keycode 105 = Hangul_Hanja"


4. CapsLock Key 를 Ctrl Key 로 설정

xmodmap -e "keycode 66 = Control_L"
xmodmap -e "clear Lock"
xmodmap -e "add Control = Control_L"


5. Window Key 를 Menu Key 로 설정

xmodmap -e "keycode 133 = Menu"


6. 설정 (Key Mapping) 영구 저장

xmodmap -pke > ~/.Xmodmap


7. 부팅시 실행: 다음을 자동으로 시작되도록 지정

xmodmap ~/.Xmodmap

2016년 1월 6일 수요일