Skip to content
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

enable_csi_u_key_encoding doesn't work as expected #2152

Closed
psych3r opened this issue Jun 21, 2022 · 3 comments
Closed

enable_csi_u_key_encoding doesn't work as expected #2152

psych3r opened this issue Jun 21, 2022 · 3 comments
Labels
docs Primarily or only affects documentation

Comments

@psych3r
Copy link

psych3r commented Jun 21, 2022

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

Windows

WezTerm version

20220619-214005-be8a6e18

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

Using the setting: enable_csi_u_key_encoding = true, I expected keys to send the corresponding csi u code automatically.

This is not the case, I have to explicitly bind the keys to send the code with something like this:
{key = "phys:i", mods = "CTRL", action = wezterm.action({ SendString = "\u{1b}[105;5u" }) }

I am not sure, Is this the intended behavior and I indeed need to bind the keys to send csi u codes manually or am I missing something?

To Reproduce

with a config file that has enable_csi_u_key_encoding = true open the terminal, press ctrl-v then press ctrl-i:
expected output: ^[[105;5u
actual output: empty string as we pressed the tab key

Configuration

enable_csi_u_key_encoding = true

Expected Behavior

No response

Logs

17:43:41.391  INFO   wezterm_gui::termwindow > OpenGL initialized! Intel(R) UHD Graphics 620 4.5.0 - Build 30.0.101.1338 is_context_loss_possible=true wezterm
 version: 20220619-214005-be8a6e18

Anything else?

No response

@psych3r psych3r added the bug Something isn't working label Jun 21, 2022
@wez
Copy link
Owner

wez commented Jun 21, 2022

On Windows, the nightly build defaults allow_win32_input_mode=true which takes precedence.
I would suggest setting allow_win32_input_mode=false if you also want CSI-u encoding.

Also: the nightly build now also has support for the kitty keyboard protocol, which addresses some deficiencies in the original CSI-u encoding: you may want to consider trying that out: enable_kitty_keyboard=true enables that.
https://sw.kovidgoyal.net/kitty/keyboard-protocol/ has more details on the protocol.
Note that because the protocol is enabled via an escape sequence, you don't need to disable win32 input mode for it to work.

This stuff needs some updates to the docs to help make this clearer!

@wez wez added docs Primarily or only affects documentation and removed bug Something isn't working labels Jun 21, 2022
wez added a commit that referenced this issue Jun 21, 2022
@wez
Copy link
Owner

wez commented Jun 21, 2022

See https://wezfurlong.org/wezterm/config/key-encoding.html for an explanation of this area.

@wez wez closed this as completed Jun 24, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docs Primarily or only affects documentation
Projects
None yet
Development

No branches or pull requests

2 participants