![如何在按住 ALT 时切换键符号?](https://linux22.com/image/1157231/%E5%A6%82%E4%BD%95%E5%9C%A8%E6%8C%89%E4%BD%8F%20ALT%20%E6%97%B6%E5%88%87%E6%8D%A2%E9%94%AE%E7%AC%A6%E5%8F%B7%EF%BC%9F.png)
答案1
我编辑了英语(美国)键盘布局如下:
$ diff /usr/share/X11/xkb/symbols/us.orig /usr/share/X11/xkb/symbols/us
26,28c26,28
< key <AD07> { [ u, U ] };
< key <AD08> { [ i, I ] };
< key <AD09> { [ o, O ] };
---
> key <AD07> { [ u, U, 7 ] };
> key <AD08> { [ i, I, 8 ] };
> key <AD09> { [ o, O, 9 ] };
39,41c39,41
< key <AC07> { [ j, J ] };
< key <AC08> { [ k, K ] };
< key <AC09> { [ l, L ] };
---
> key <AC07> { [ j, J, 4 ] };
> key <AC08> { [ k, K, 5 ] };
> key <AC09> { [ l, L, 6 ] };
51,53c51,53
< key <AB07> { [ m, M ] };
< key <AB08> { [ comma, less ] };
< key <AB09> { [ period, greater ] };
---
> key <AB07> { [ m, M, 1 ] };
> key <AB08> { [ comma, less, 2 ] };
> key <AB09> { [ period, greater, 3 ] };
56a57,58
>
> include "level3(ralt_switch)"
这样我就可以输入如下数字:
Right Alt+ U-> 7
Right Alt+ K-> 5
ETC。
线路
include "level3(ralt_switch)"
启用第三级机制;在这种情况下,Right Alt这是使用第三级和第四级符号的键盘布局的默认设置,但可以更改。