当前位置: 首页 > 工具软件 > AutoKey > 使用案例 >

simulate “insert“ key with xmodmap | 模拟 “shift + insert” key with autokey-gtk

充煌
2023-12-01
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:

  1. Key
  2. Shift+Key
  3. mode_switch+Key
  4. mode_switch+Shift+Key
  5. AltGr+Key
  6. 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

 类似资料: