
所以我試圖創建一個按鍵組合來為葡萄牙語佈局生成 ISO 鍵,有問題的鍵是< >,按它通常會生成<
字符,< >+Shift將生成>
字符。所以我嘗試使用 創建一個組合xmodmap
,並且我希望它適用於所有程式。我一直在谷歌上搜尋並想出了這Control+ P= 的範例Up:
xmodmap -e "keycode 33 = p P Up"
keycode 33
matches p,那麼Control該指令中出現了什麼?
我想要的是:
- 地圖Control+,到>
- 地圖Control+.到<
答案1
另一個問題的例子是錯誤的。
xmodmap -e "keycode 33 = p P Up"
通常意味著按AltGr+p將導致Up.
更準確地說,這意味著按 Mode_switch+p將導致Up.
作為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.
可以將不同的或附加的 (to AltGr) 對應為Mode_switch鍵,例如正確的Ctrl鍵:
xmodmap -e "keycode 105 = Mode_switch Mode_switch"
但問題是,該鑰匙將不再像普通Ctrl鑰匙一樣運作。