2

I am trying to make the Kate editor copy the current line or the current selection to clipboard using xdotool. Using xdotool I could move the cursor and delete and do other actions but not copy. The copy shortcut (ctrl+c) works if I press it in kate but not when I call it with xdotool.

Here is the code. Surprisingly, the result of info is empty after at the end.

dummyClip="DUMMY!!!"
echo -n $dummyClip | xclip -selection clipboard
xdotool search --name kate key ctrl+c
info=$(xclip -o -selection clipboard)

I have struggled with this a lot. Your help is highly appreciated.

0 Answers0