highlighting/selecting text on a chromebook

712 views
Skip to first unread message

nat...@natb1.com

unread,
May 3, 2014, 1:21:32 PM5/3/14
to chromiu...@chromium.org
tmux and vim within hterm capture mouse drag events and prevent hterm from selecting and copying text (as expected). At least, I assume this is what is happening. On a mac, the alt/option key can be used to prevent vim/tmux from handling the mouse drag event causing hterm to highlight and copy text. The alt key on a chromebook does not have the same effect.

Is there a way to highlight and copy text on a chromebook the way I can on a mac using the option key?

brettm...@gmail.com

unread,
May 5, 2014, 11:55:20 AM5/5/14
to chromiu...@chromium.org, nat...@natb1.com
I appreciate it. Thank you.

Robert Ginda

unread,
May 5, 2014, 4:08:16 PM5/5/14
to nat...@natb1.com, chromium-hterm
Unfortunately, Chrome OS translates Alt+Mouse to a right-click, even if you add additional modifiers.  I just filed https://code.google.com/p/chromium/issues/detail?id=370133 to track this issue.

With the current code, the only way to do local selection on Chrome OS is to disable mouse mode in vi first.  You can re-enable mouse mode once the selection is made.

Or, you can use something like https://github.com/libapps/libapps-mirror/blob/master/hterm/etc/osc52.vim to automatically send your vim selection to the local machine's clipboard.  With this script you'll be able to copy multiple pages of vim text to the system clipboard.


Rob.



On Sat, May 3, 2014 at 10:21 AM, <nat...@natb1.com> wrote:
tmux and vim within hterm capture mouse drag events and prevent hterm from selecting and copying text (as expected). At least, I assume this is what is happening. On a mac, the alt/option key can be used to prevent vim/tmux from handling the mouse drag event causing hterm to highlight and copy text. The alt key on a chromebook does not have the same effect.

Is there a way to highlight and copy text on a chromebook the way I can on a mac using the option key?

--
You received this message because you are subscribed to the Google Groups "chromium-hterm" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-hterm/0b0f6704-3102-4de5-b131-39c1ca09600e%40chromium.org.

p...@google.com

unread,
Aug 4, 2017, 7:55:16 AM8/4/17
to chromium-hterm, nat...@natb1.com
I need the same functionality for tmux. On Ubuntu, it's the Shift key that makes the terminal handle mouse events directly.

Is there a similar workaround for getting the copied buffer from tmux to the Chromebook? tmux let's you pipe the contents anywhere: https://wiki.archlinux.org/index.php/tmux#X_clipboard_integration

Thanks,
Philipp

Mike Frysinger

unread,
Aug 4, 2017, 10:44:17 AM8/4/17
to p...@google.com, chromium-hterm, nat...@natb1.com
i had tried implementing shift, but it gets tricky because shift+mouse is what chrome uses to modify its own copy & paste selection

if you're asking about OSC52, please see the FAQ:
-mike

p...@google.com

unread,
Aug 4, 2017, 11:26:15 AM8/4/17
to chromium-hterm, p...@google.com, nat...@natb1.com
Yay, thanks! That works in combination with the yank script from here: https://raw.githubusercontent.com/sunaku/home/master/bin/yank (configure in tmux like this: https://sunaku.github.io/tmux-yank-osc52.html)
Reply all
Reply to author
Forward
0 new messages