为Deepin-wechat微信绑定一个全局的呼出快捷键
Tofloor
poster avatar
hohocheyan
deepin
2020-06-13 19:49
Author
微信本身自带快捷键呼出的功能,但在Wine下,无法相应全局快捷键,使用按键精灵可以解决此问题。

1、安装xdotool
sudo apt-get install xdotool

2、在微信里设置呼出快捷键
我这里设置成 Ctrl+Shift+A



3、编写脚本,存储成 wechat.sh ,内容为:

#!/bin/bash
xdotool key --window $(xdotool search --name "微信"|head -n1) "Ctrl+Shift+A"
exit 0


4、在系统里为这个脚本绑定一个快捷键,按键也必须为 Ctrl+Shift+A,记得前面加上bash

bash /home/iamcheyan/App/Wechat/wechat.sh


5、之后在任意地方按Ctrl+Shift+A就可以呼出微信

Reply Favorite View the author
All Replies
avatar
林子
deepin
2022-07-19 23:16
#1

执行
xdotool key --window $(xdotool search --name "微信" head -n1) "Ctrl+Shift+A"
这个无法”调出”微信界面
执行
xdotool search --name "微信" head -n1)
显示微信多个窗口编号
真奇怪

Reply View the author
avatar
tee
deepin
2023-06-12 19:28
#2
林子

执行
xdotool key --window $(xdotool search --name "微信" head -n1) "Ctrl+Shift+A"
这个无法”调出”微信界面
执行
xdotool search --name "微信" head -n1)
显示微信多个窗口编号
真奇怪

这个就需要自己排查出真正的窗口id了

Reply View the author