fukayatsuのブログ

主にコーディングとか、技術的なことについて。間違い等ありましたら容赦なくツッコミお願いします。

Ubuntu on MacBookAirにおけるkey config

.xmodmaprc (xmodmap)

!! Caps Lock -> escape(oneshot), Control by at-home-modifier
remove Lock = Caps_Lock
keycode 66 = Escape
!add Control = Control_L

!! セミコロンとコロンを入れ替え
keycode 47 = colon semicolon colon semicolon

!! Super_L(133) -> 無変換
!! Super_R(134) -> 変換(one shot), Mode_switch by at-home-modifier
!! Alt_R(108) -> Super_R
remove mod4 = Super_L Super_R
remove mod1 = Alt_R
keycode 133 = Muhenkan
keycode 134 = Henkan
keycode 108 = Super_R
add mod4 = Super_R

!! Vim like なキーボード移動
keycode 102 = Mode_switch
keysym h = h H Left
keysym j = j J Down
keysym k = k K Up
keysym l = l L Right

!! natural scroll
pointer = 1 2 3 5 4 7 6

/usr/share/X11/xorg.conf.d/10-evdev.conf (at-home-modifier)

以下を追記
Section "InputClass"
    Identifier "my keyboard"
    Driver "evdev"
    Option "XKBOptions" "terminate:ctrl_alt_bksp" # and so on

    # If you save this file under xorg.conf.d/ :
    Option "AutoServerLayout" "on"

    MatchIsKeyboard "on"
    #space:shift_L Muhenkan:switch_mode Henkan:switch_mode escape:controle_L
    Option "TransMod" "65:50 133:102 134:102 66:37" # *** Look here ***
EndSection