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

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值