CentOS系统下修改键盘映射的方法
程序员文章站
2022-06-20 10:25:27
CentOS系统下修改键盘映射的方法前一段时间自己的笔记本被东西砸了一下,结果往右的方向键坏了,而且本本已经过保了,在terminal下很影响使用,倒是在windows下改过键盘映射,linux下还没有做过,在网上查了一下,还... 12-10-24...
只要使用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~~,右方向键终于被复活了,不过得找一个替身哦
首先查看右方向键和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~~,右方向键终于被复活了,不过得找一个替身哦
上一篇: 为我的机智点赞
下一篇: blender多个动画该怎么合并?