Replies: 1 comment 2 replies
-
Think there might be a bug in this area. I'm having more luck with an table.insert(copy_mode, {
key = 'c',
mods = 'CTRL|SHIFT',
action = act.Multiple {
act.CopyMode { SetSelectionMode = 'Line' },
wezterm.action_callback(function(win, pane)
local selected_text = win:get_selection_text_for_pane(pane)
win:copy_to_clipboard(selected_text)
win:perform_action(act.ClearSelection, pane)
end),
}
}) However, this seems to work inconsistently on Linux (doesn't work the first time I try it after opening a new tab). Seems OK on Windows (same WezTerm version). |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What Operating System(s) are you running on?
Windows
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
wezterm 20240203-110809-5046fc22
Ask your question!
Hi! I am trying to tweak my keyboard shortcuts for copy mode. I would really like to have a single shortcut to copy the entire line the cursor is on, but I can't seem to make the
Multiple
action do that.Here's an example from my
wezterm.lua
with number keys bound to actions:If I press 1 then 2 in Copy Mode, it works as expected and the line the cursor is on is copied to the clipboard.
If I press 3, the entire line is selected but not copied to the clipboard.
Anyone know what I'm doing wrong (or have another idea for how to achieve this)?
Beta Was this translation helpful? Give feedback.
All reactions