我用来xdotool
创建一个简单的键盘快捷键:
$ gsettings get org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ name
'Test'
$ gsettings get org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ binding
'F3'
$ gsettings get org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ command
'test.sh'
-----
$ cat test.sh
#!/usr/bin/env bash
VAR1="Test123@"
sleep 0.5; xdotool type --clearmodifiers "$VAR1"
问题是at
输出中经常缺少该符号 - 是因为它是特殊字符还是我做错了什么?
$ cat /etc/fedora-release
Fedora release 21 (Twenty One)
$ xdotool --version
xdotool version 2.20110530.1