我不确定如何交换这两个,这是我的思考过程,但不确定如何让它发挥作用:
remove sh = Shift_R
remove dl = Delete
keysym Delete = Shift_R
keysym Shift_R = Delete
add sh = Delete
add dl = Shift_R
这是基于我用来交换大写锁定和控制的代码。
有什么想法吗?
xmodmap 输出:
dan@lantea:~$ xmodmap -pke | grep Shift_R
keycode 91 = Shift_R NoSymbol Shift_R
keycode 119 = Shift_R NoSymbol Shift_R
dan@lantea:~$ xmodmap -pke | grep Delete
keycode 62 = Delete NoSymbol Delete
答案1
您可以使用以下命令:
xmodmap -e "keycode 62 = Delete NoSymbol Delete" #this will make Shift_R key to act as delete
xmodmap -e "keycode 119 = Shift_R NoSymbol Shift_R" #this will make Delete key to act as right shift
为了在每个会话中获取此更改,在运行前面的命令后,.xmodmap
使用新的键盘映射创建一个名为的文件,并使用以下命令:
xmodmap -pke > .xmodmap
然后,在您的主目录中创建一个名为的文件.xinitrc
,其中包含以下行/命令:
xmodmap .xmodmap
最后,使.xinitrc
文件可执行:
chmod 755 ~/.xinitrc