I found it in the while.
Note: I have this option set in .tmux.conf that states that the keys hjkl should be used to move the cursor as in vim:
set-window-option -g mode-keys vi
I created a separate file which I named copy-that.tmux.
It contains those lines:
First line enters copy mode, the following move the cursor up. You can also use
If you don't have vim-mode keys, but I wasn't able to find a way to put several of those in a single line.
Then I move to the beginning of the line with '0', enter visual mode with 'v', go down with 'j', move to the end of the line with $, and finally yank the text with 'y'.
Then I bound the execution of the script in .tmux.conf:
bind -n F6 run "/path/to/copy-that.tmux"