Answers:
这不容易实现。
如xmodmap手册页所述:
The first keysym is used when no modifier key is pressed in conjunction with
this key, the second with Shift, the third when the Mode_switch key is used
with this key and the fourth when both the Mode_switch and Shift keys are used.
默认情况下,AltGr是Mode_switch键。
可以将其他(或AltGr)作为Mode_switch键映射,例如右键Ctrl:
xmodmap -e "keycode 105 = Mode_switch Mode_switch"
但是,问题在于密钥将不再像普通Ctrl密钥一样起作用。
顺便说一句:有一个问题正好要问如何使用该Ctrl键作为修饰符键: 如何将Control用作xmodmap的修饰符?
尝试:
xmodmap -e "keycode 33 = p P Up"
让我知道这是否是您想要的结果。
正如nidi所说,使用xmodmap很难做到这一点。
但是,使用AutoKey超级简单。
参见以下答案作为示例:https : //askubuntu.com/a/303978/140789