1.simulate insert key with xmodmap
用F9来替换insert键:
# set Key and Shift+Key
xmodmap -e "keycode 75 = Insert Insert"
or
# set all
xmodmap -e "keycode 75 = Insert Insert Insert Insert Insert Insert"
原理:
先用xev来查看按键的键值,上面的keycode 75就是按F9输出的键值
notice:
Each keysym column in the table corresponds to a particular combination of modifier keys:
- Key
- Shift+Key
- mode_switch+Key
- mode_switch+Shift+Key
- AltGr+Key
- AltGr+Shift+Key
2. 模拟 “shift + insert” with autokey-gtk or autokey-qt
2-1. 安装
sudo apt install autokey-gtk
2-2. 新建script,设置触发的快捷键
内容是:
keyboard.send_keys("<shift>+<insert>")
设置hotkey为:
<ctrl>+<alt>+i
参考文献:
https://stackoverflow.com/questions/55647612/trying-to-emulate-shiftend-with-autokey
https://unix.stackexchange.com/questions/307821/trying-to-remap-f9-to-insert-key