-
-
Notifications
You must be signed in to change notification settings - Fork 840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paste not working when wezterm connect unix_domain
from local WSL2
#3968
Comments
Please run through https://wezfurlong.org/wezterm/troubleshooting.html#debugging-keyboard-related-issues to capture some debugging around your leader-v key press so we can see what it is trying to do |
Set
|
I'd like to see the debug_key_events output from the
and share its output |
Okay, I will update it as soon as I have some free time. |
➜ wezterm --config "debug_key_events=true" connect xxx
10:31:53.845 INFO mux > detaching domain
10:31:53.846 INFO wezterm_client::domain > detached domain 9
10:31:53.846 INFO mux > domain detached panes: [3, 1, 2, 4] Seems no key event log output from terminal wezterm? |
I believe I might be seeing the same issue. I'm running Select text ‣ Ctrl+Shift+C ‣ Paste into Windows application works. $ wsl.exe --version
WSL version: 2.1.5.0
Kernel version: 5.15.146.1-2
WSLg version: 1.0.60
MSRDC version: 1.2.5105
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.4412 LogI copied something to the clipboard from Windows, then started Wezterm and pressed Ctrl+Shift+V.$ wezterm --skip-config --config "debug_key_events=true"
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
16:22:08.574 INFO wezterm_gui::termwindow::keyevent > key_event RawKeyEvent { key: Physical(LeftControl), modifiers: NONE, leds: NUM_LOCK, phys_code: Some(LeftControl), raw_code: 37, repeat_count: 1, key_is_down: true, handled: Handled(false) }
16:22:08.574 INFO wezterm_gui::termwindow::keyevent > key_event KeyEvent { key: LeftControl, modifiers: NONE, leds: NUM_LOCK, repeat_count: 1, key_is_down: true, raw: Some(RawKeyEvent { key: Physical(LeftControl), modifiers: NONE, leds: NUM_LOCK, phys_code: Some(LeftControl), raw_code: 37, repeat_count: 1, key_is_down: true, handled: Handled(false) }) }
16:22:08.574 INFO wezterm_gui::termwindow::keyevent > send to pane DOWN key=LeftControl mods=NONE
16:22:08.702 INFO wezterm_gui::termwindow::keyevent > key_event RawKeyEvent { key: Physical(LeftShift), modifiers: CTRL, leds: NUM_LOCK, phys_code: Some(LeftShift), raw_code: 50, repeat_count: 1, key_is_down: true, handled: Handled(false) }
16:22:08.702 INFO wezterm_gui::termwindow::keyevent > key_event KeyEvent { key: LeftShift, modifiers: CTRL, leds: NUM_LOCK, repeat_count: 1, key_is_down: true, raw: Some(RawKeyEvent { key: Physical(LeftShift), modifiers: CTRL, leds: NUM_LOCK, phys_code: Some(LeftShift), raw_code: 50, repeat_count: 1, key_is_down: true, handled: Handled(false) }) }
16:22:08.702 INFO wezterm_gui::termwindow::keyevent > send to pane DOWN key=LeftShift mods=CTRL
16:22:08.941 INFO wezterm_gui::termwindow::keyevent > key_event RawKeyEvent { key: Physical(V), modifiers: SHIFT | CTRL, leds: NUM_LOCK, phys_code: Some(V), raw_code: 55, repeat_count: 1, key_is_down: true, handled: Handled(false) }
16:22:08.941 INFO wezterm_gui::termwindow::keyevent > key_event KeyEvent { key: Char('V'), modifiers: CTRL, leds: NUM_LOCK, repeat_count: 1, key_is_down: true, raw: Some(RawKeyEvent { key: Physical(V), modifiers: SHIFT | CTRL, leds: NUM_LOCK, phys_code: Some(V), raw_code: 55, repeat_count: 1, key_is_down: true, handled: Handled(false) }) }
16:22:08.941 INFO wezterm_gui::termwindow::keyevent > Char('V') CTRL -> perform PasteFrom(Clipboard)
16:22:09.035 INFO wezterm_gui::termwindow::keyevent > key_event KeyEvent { key: Char('V'), modifiers: CTRL, leds: NUM_LOCK, repeat_count: 1, key_is_down: false, raw: Some(RawKeyEvent { key: Physical(V), modifiers: SHIFT | CTRL, leds: NUM_LOCK, phys_code: Some(V), raw_code: 55, repeat_count: 1, key_is_down: false, handled: Handled(false) }) }
16:22:09.035 INFO wezterm_gui::termwindow::keyevent > send to pane UP key=Char('V') mods=CTRL
16:22:09.162 INFO wezterm_gui::termwindow::keyevent > key_event KeyEvent { key: LeftShift, modifiers: SHIFT | CTRL, leds: NUM_LOCK, repeat_count: 1, key_is_down: false, raw: Some(RawKeyEvent { key: Physical(LeftShift), modifiers: SHIFT | CTRL, leds: NUM_LOCK, phys_code: Some(LeftShift), raw_code: 50, repeat_count: 1, key_is_down: false, handled: Handled(false) }) }
16:22:09.162 INFO wezterm_gui::termwindow::keyevent > send to pane UP key=LeftShift mods=SHIFT | CTRL
16:22:09.171 INFO wezterm_gui::termwindow::keyevent > key_event KeyEvent { key: LeftControl, modifiers: CTRL, leds: NUM_LOCK, repeat_count: 1, key_is_down: false, raw: Some(RawKeyEvent { key: Physical(LeftControl), modifiers: CTRL, leds: NUM_LOCK, phys_code: Some(LeftControl), raw_code: 37, repeat_count: 1, key_is_down: false, handled: Handled(false) }) }
16:22:09.171 INFO wezterm_gui::termwindow::keyevent > send to pane UP key=LeftControl mods=CTRL
16:22:12.245 WARN window::os::wayland::connection > Enter { serial: 2561, surface: wl_surface@34, keys: [] }, no known surface
warning: queue 0x55f708592e50 destroyed while proxies still attached:
wl_buffer@53 still attached
wl_buffer@52 still attached
wl_buffer@57 still attached
wl_buffer@48 still attached
wl_buffer@47 still attached
wl_callback@46 still attached
wl_data_offer@4278190083 still attached
wl_data_offer@4278190082 still attached
wl_buffer@20 still attached
wl_shm_pool@23 still attached
wl_buffer@45 still attached
wl_buffer@44 still attached
wl_buffer@51 still attached
wl_buffer@50 still attached
wl_buffer@49 still attached
wl_data_offer@4278190080 still attached
wl_subsurface@43 still attached
wl_surface@42 still attached
wl_subsurface@41 still attached
wl_surface@40 still attached
wl_subsurface@39 still attached
wl_surface@38 still attached
wl_subsurface@37 still attached
wl_surface@36 still attached
wl_subsurface@35 still attached
wl_surface@34 still attached
xdg_wm_base@17 still attached
wl_surface@16 still attached
wl_data_device@14 still attached
wl_pointer@12 still attached
wl_keyboard@3 still attached
wl_data_device@11 still attached
wl_output@10 still attached
wl_seat@9 still attached
wl_output@8 still attached
wl_shm@7 still attached
wl_data_device_manager@6 still attached
wl_subcompositor@5 still attached
wl_compositor@4 still attached
wl_registry@2 still attached Possibly related: I devised the following workaround using wl-clipboard: local wezterm = require "wezterm"
local config = wezterm.config_builder()
if os.getenv("WSL_DISTRO_NAME") ~= nil then
config.keys = {
{
key = "v",
mods = "CTRL|SHIFT",
action = wezterm.action.EmitEvent("wsl-paste-workaround"),
},
}
wezterm.on("wsl-paste-workaround", function(window, pane)
local success, stdout, stderr = wezterm.run_child_process({"wl-paste", "--no-newline"})
if success then
pane:paste(stdout)
else
wezterm.log_error("wl-paste failed with\n" .. stderr .. stdout)
end
end)
end
|
The issue also happens for me in my NixOS with Hyprland, haven't tested your approach, but mine is the same as yours (thank you btw for the workaround), just shorter, so if anyone wants to copy it:
Similar to the previous answer, but this can be directly added to the config.keys |
Workaround obtained from: wez/wezterm#3968 - Replaced Foot terminal with Wezterm - Reason: Tried to change keybinds, the issue is that inside lf, the keybinds conflict. With Wezterm, that can be avoided (tho needs improvement) - Moved foot/ from software/ to unused/ - Added Wezterm custom .desktop entry for Rofi
What Operating System(s) are you seeing this problem on?
Windows
Which Wayland compositor or X11 Window manager(s) are you using?
I'm also use wslg on wsl2, seem it's using wayland( don't known how to check)
WezTerm version
20230408-112425-69ae8472
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
No, and I'll explain why below
Describe the bug
I used WSL2 on Windows 11, so I put wezterm config on
/mnt/c/Users/xxx/.config/wezterm
for windows gui and/home/dev/.config/wezterm
for wsl2. and config thedefault_domain
to WSL, so I can launch WSL shell directly.Because
wezterm ssh SSHMUX:xxx
seems not support ProxyCommand, I have added unix_domains from~/.ssh/config
in my wezterm config fileand then
wezterm connect xxx
from windows gui (Term 1) succeed. and a new gui from wls2 was created(Term2) which running the remote shell.Right mouse click or "LEADER-v" to paste from clipboard (which is workable on local) not workable on Term2.
I can confirm that copy is workable. (I can copy from "Term 2", and paste to other place include Term 1. but I can't paster to Term 2)
my mouse and key config, it's same on local (include windows and wsl) and remote
To Reproduce
No response
Configuration
https://github.com/ensonmj/dotfiles/tree/master/wezterm/.config/wezterm
Expected Behavior
copy and paste should work like local
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: