用xmodmap -pm可以查看各个控制键有lock, control mod1-mod4等这样的值,
我需要更改control键的定义,去掉没用的capslock键,那么我需要首先知道capslock的键值
可以用xev命令查看键盘的按键对应的键值.同样我可以更改win键,使它成为我的meta键。然后把要更改的键值写入~/.Xmodmap中,我的如下.我还定义了power键,在xfce的键盘快捷键中定义power为命令poweroff的快捷键,这样就实现了一键关机,我还定义了一键重启为wakeup键.
把小键盘的/*-分别定义为静音,音量减少,音量增加。
我的~/.inptrc的内容
"\e":"^[" #define escape
"\eOP":"emacs\n" #f1 start emacs
"\eOQ":"mplayer -zoom -xy 1024 -fs -quiet " #f2 start mplayer with fullscreen
#"\eOR":"/home/wayy/Opera/bin/opera\n" #f3 start opera
"\eOS":"firefox\n"#f4 start firefox
我的~/.Xmodmap的内容
clear mod4
clear mod3
keycode 115 = Meta_L Super_L
keycode 116 = Meta_R Super_R
add mod4 = Super_L Super_R
keycode 222 = XF86PowerOff
keycode 223 = XF86Sleep
keycode 227 = XF86WakeUp
keycode 112 = XF86AudioMute
keycode 63 = XF86AudioLowerVolume
keycode 82 = XF86AudioRaiseVolume
clear lock
clear mod2
remove control = Control_L
keycode 66 = Control_L
keycode 86 = Caps_Lock
keycode 77 = Num_Lock Pointer_EnableKeys
keycode 90 = F20
add lock = Caps_Lock
add control = Control_L
add mod2 = Num_Lock
没有评论:
发表评论