TripleClick1 doesn't trigger if DoubleClick1 is bound

24 views
Skip to first unread message

Jason White

unread,
Feb 8, 2021, 8:49:32 PM2/8/21
to tmux-...@googlegroups.com
Hello,

Using tmux 3.1c under macOS Catalina with latest iTerm2. I've seen an number
of bindings that, with mouse mode enabled, allow one to double click to select
a word and triple click to select a line. They look more or less like what I
have in my .tmux.conf:

bind-key -n DoubleClick1Pane \
select-pane \; \
copy-mode -H \; \
send-keys -MX select-word \; \
run-shell "sleep .5s" \; \
send-keys -X copy-pipe-and-cancel "pbcopy"

bind-key -T copy-mode DoubleClick1Pane \
select-pane \; \
send-keys -MX select-word \; \
run-shell "sleep .5s" \; \
send-keys -X copy-pipe "pbcopy"

bind-key -n TripleClick1Pane \
select-pane \; \
copy-mode -H \; \
send-keys -MX select-line \; \
run-shell "sleep .5s" \; \
send-keys -X copy-pipe-no-cancel "pbcopy"

bind-key -T copy-mode TripleClick1Pane \
select-pane \; \
send-keys -MX select-line \; \
run-shell "sleep .5s" \; \
send-keys -X copy-pipe "pbcopy"

I have no issues with DoubleClick1Pane events whether in or out of copy mode,
but the TripleClick1Pane events only trigger if I unbind the DoubleClick1Pane
events, regardless of mode. It seems like tmux isn't waiting to see if
there's a third click -- it sees two clicks and declares it a DoubleClick and
triggers accordingly.

I've tried the stock Terminal.app, but the behavior is the same.

Any thoughts on what to try next?

Thanks,
-Jason

--
Jason White
"The single biggest problem in communication is the illusion that it has taken place." - George Bernard Shaw

Nicholas Marriott

unread,
Feb 8, 2021, 11:33:29 PM2/8/21
to Jason White, tmux-users
Does this still happen with master?



--
You received this message because you are subscribed to the Google Groups "tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/YCHpsXi%2B9sTG6GP3%40equinox.home.menelos.com.

Jason White

unread,
Feb 9, 2021, 12:13:19 AM2/9/21
to Nicholas Marriott, tmux-users
No, it works properly in master.

I do notice that on a double click there's a slight fraction-of-a-second delay
after a double-click before the word is highlighted, but if I triple click
there's virtually no delay between hitting that third click and the selection
of the whole line. I assume this is tmux waiting, after two clicks, to see if
there's going to be a third click. Any chance this wait period can be made
adjustable?

Thank you.
-Jason

Nicholas Marriott

unread,
Feb 9, 2021, 2:43:36 AM2/9/21
to Jason White, tmux-users
No the time is already as short as it is practical to make it.
Reply all
Reply to author
Forward
0 new messages