如何修改centos的键盘映射
发布网友
发布时间:2022-04-23 14:02
我来回答
共1个回答
热心网友
时间:2023-08-30 06:52
只要使用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~~,右方向键终于被复活了,不过得找一个替身哦