解决方法
下面是我的.Xmodmap.它并没有完全实现您的规范,但应该让您了解如何实现它.在您的情况下,只需要修改Sec-2;假设您的键盘与我的键盘相似,则此部分只需要1行:键码108 = Alt_R,因为Alt_L已被X服务器识别为Meta_L.
这是我的.Xmodmap,它使Emacs识别的所有修饰符都可用(Alt,Meta,Super,Hyper,Control,Shift):
!!! Implement the following layout: !!! Alt A S D F ... !!! Shift Z X C V B N M ... !!! Hyper Super Meta --Space-- Control Super Hyper !!! by transforming from the conventional layout: !!! Caps:66 !!! Shift !!! Ctrl:37 Win:133 Alt:64 Space AltGr:108 Menu:135 Ctrl:105 !! Sec-1. clear Control clear Lock clear mod1 clear mod2 clear mod3 clear mod4 clear mod5 !! Sec-2. System dependent; use xev to find the exact keycodes: keycode 37 = Hyper_L keycode 64 = Meta_L keycode 66 = Alt_L keycode 105 = Hyper_R keycode 108 = Control_R keycode 135 = Super_R !! Sec-3. add Control = Control_L Control_R add mod1 = Meta_L Meta_R add mod2 = Hyper_L Hyper_R add mod3 = Num_Lock add mod4 = Alt_L Alt_R Multi_key add mod5 = Super_L Super_R Mode_switch