CentOS系统下修改键盘映射的方法

网络安全 2021-07-03 11:05www.168986.cn网络安全知识
只要使用xmodmap命令把坏的键的映射值和你想要替换的映射值互换一下就可以了,因为右方向键和End键离的最近,所以就用End键替换坏掉的右方向键。
查看右方向键和End键的值
# xmodmap -pke |grep -i end
keycode 87 = KP_End KP_1 KP_End KP_1
keycode 115 = End NoSymbol End
keycode 153 = XF86Send NoSymbol XF86Send
keycode 213 = XF86Suspend NoSymbol XF86Suspend
keycode 239 = XF86Send NoSymbol XF86Send
# xmodmap -pke |grep -i right
keycode  19 = 0 parenright 0 parenright
keycode  35 = bracketright braceright bracketright braceright
keycode  85 = KP_Right KP_6 KP_Right KP_6
keycode 114 = Right NoSymbol Right
keycode 188 = parenright NoSymbol parenright
keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown
keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp
keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
这样就找出了End键 和 右方向键的值,但不是很确认 87 和 115  85 和 114 哪一个才是准确的,于是全都互换了在用户家目录下创建一个文件 .Xmodmaprc
keycode 85 = KP_End KP_1 KP_End KP_1
keycode 114 = End NoSymbol End
keycode 87 = KP_Right KP_6 KP_Right KP_6
keycode 115 = Right NoSymbol Right
保存退出
执行 xmodmap ~/.Xmodmaprc
是更改生效
WOW~~,右方向键终于被复活了,不过得找一个替身哦

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by