How to define a global shortcut Ctrl+a 1 with AutoKey which sends the same keystroke Ctrl+a 1 to the window with title 'gnu screen' ? If there is no such titled window it should show a popup message "Couldn't find destination window".
Ubuntu – How to define AutoKey shortcut which sends the same keystroke to the window with certain title
autokeygnu-screen
Best Answer
Install libnotify-bin which provides notify-send
Create new script:
Setup its hot key as: Ctrl+a
To trigger it: Ctrl+a then 1 (in <1sec)
Debug
Launch X Event Tester in separate terminal window
Check it's window title, mine shows
Event Tester
Modify script to target
Event Tester
window.If
xev
receives the key sequence. Its output should be some thing similar to:Note, I have removed the
if
condition to check active title. The script activates/raises xev window but the check doesn't find the correct title. I got just the notification message.