Skip to content

Instantly share code, notes, and snippets.

@trydofor
Last active May 2, 2017 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save trydofor/6333c79ae3e7ffac2e0d699043651316 to your computer and use it in GitHub Desktop.
Save trydofor/6333c79ae3e7ffac2e0d699043651316 to your computer and use it in GitHub Desktop.
支持shift选择的映射
!! Exec=bash -c "/usr/bin/xmodmap $HOME/.xmodmaprc"
! xmodmap .xmodmaprc
! xmodmap -pke|grep -E ' (Caps|Cont|Home|Next|Up|Down|Left|Right|Home|End|Prior|Next|Delete|Escape|Mode_switch)'
! xev
!! Control_L(37)变成Mode_switch
remove Control = Control_L
keycode 37 = Mode_switch NoSymbol
!! Caps_Lock(66)变成Control_L
remove Lock = Caps_Lock
keycode 66 = Control_L NoSymbol
add Control = Control_L
!!! 方向/emacs
!keycode 33 = p P Up Up
!keycode 57 = n N Down Down
!keycode 56 = b B Left Left
!keycode 41 = f F Right Right
!keycode 38 = a A Home Home
!keycode 26 = e E End End
!! 方向/游戏
keycode 25 = w W Up Up
keycode 39 = s S Down Down
keycode 38 = a A Left Left
keycode 40 = d D Right Right
keycode 24 = q Q Home Home
keycode 26 = e E End End
!! 翻页
keycode 27 = r R Prior Prior
keycode 41 = f F Next Next
!! 方向/vim
keycode 45 = k K Up Up
keycode 44 = j J Down Down
keycode 43 = h H Left Left
keycode 46 = l L Right Right
keycode 31 = i I Home Home
keycode 32 = o O End End
!! 翻页
keycode 59 = comma less Prior Prior
keycode 60 = period greater Next Next
!! 功能
keycode 52 = z Z BackSpace BackSpace
keycode 53 = x X Delete Delete
keycode 54 = c C Escape Escape
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment