wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
16.78k stars 752 forks source link

Send shortkey as ascii-like content in tmux #4058

Closed Comic3022 closed 7 months ago

Comic3022 commented 1 year ago

What Operating System(s) are you seeing this problem on?

macOS

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20230712-072601-f4abf8fd

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

case1: Sometimes in tmux, when I press ctrl+b, it shows ;5;98~ and I can't switch buffer in tmux. case2: Sometimes also in tmux, when I click in wezterm, some ascii-like string is input in shell and I can't select content.

In case1, I just kill the tab, and it send a 'logout' to the shell. After restart the problem go away. In case2, problems can't be resolved, I can only kill the tmux panel.

I wonder if I accidently enter some input mode that cause this behavior? Or this is a bug.

To Reproduce

No response

Configuration

-- Pull in the wezterm API local wezterm = require 'wezterm' local mux = wezterm.mux local act = wezterm.action

wezterm.on('gui-startup', function() local tab, pane, window = mux.spawn_window({}) window:gui_window():maximize() end)

-- This table will hold the configuration. local config = {}

-- In newer versions of wezterm, use the config_builder which will -- help provide clearer error messages if wezterm.config_builder then config = wezterm.config_builder() end

-- This is where you actually apply your config choices

-- For example, changing the color scheme: config.color_scheme = 'Atelier Dune Light (base16)' config.initial_cols = 180 config.initial_rows = 60 config.font_size = 16 config.scrollback_lines = 100000 config.enable_scroll_bar = true config.window_decorations = "RESIZE" config.font = wezterm.font_with_fallback { 'JetBrainsMono Nerd Font', 'FiraCode Nerd Font', 'DroidSansM Nerd Font', 'DengXian', }

-- config.line_height = 1.2 config.use_dead_keys = false

-- and finally, return the configuration to wezterm return config

Expected Behavior

No response

Logs

No response

Anything else?

No response

wez commented 7 months ago

It sounds as though case 1 is that modifyOtherKeys mode has been enabled and not turned off. For case 2 is sounds as though mouse reporting has been enabled and not turned off. That can happen if the program that enabled them crashes or otherwise forgot to cancel those modes. You can use the command palette (CTRL-SHIFT-P) to select "Reset terminal emulation state" to cancel those reporting modes. The real fix is to identify the software that is enabling those modes and either correct its configuration or stop using it.

github-actions[bot] commented 6 months ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.