CTRL-* keys not recognized under wezterm
Heya,
thank you so much for this project! I've recently switched to wezterm, and not I'm encountering a strange issue.
It seems like mprocs is unable to process any keypresses modified with CTRL, notably including CTRL-a for switching focus.
I've emptied out my wezterm configuration and tried wezterm 20240203-110809-5046fc22 (from arch repos) and wezterm 0-unstable-2025-01-03 (via nix using nixGL on my arch installation). I also tried using wezterm's enable_kitty_keyboard setting, with no effect.
For testing, I'm using showkeys -a.
On any terminal: (wezterm, kitty, konsole, ghostty):
- showkeys prints codes for ctrl-a, ctrl-b, ...
Running showkeys in mprocs in any terminal except wezterm:
- ctrl-a switches focus, other ctrl-* print the code
Running showkeys in mprocs in wezterm:
- non-modified keys show codes, any key with ctrl- doesn't print anything.
I'll admit that I have a bespoke setup, but I'd love to hear if this works for other people.
mprocs 0.7.1 from github:nixos/nixpkgs/5630cf13cceac06cefe9fc607e8dfa8fb342dde3?narHash=sha256-FQoi3R0NjQeBAsEOo49b5tbDPcJSMWc3QhhaIi9eddw%3D (2025-04-24 09:41:29)
To reproduce (assuming you have nix and wezterm installed)
# open wezterm
git clone https://gitlab.com/sea-watch.org/planner.git
cd planner
nix develop
mprocs
# try to switch focus
I'd be more than happy to keep digging into this, but I think I need some support regarding how mprocs handles input.
Try adding this to wezterm config:
enable_csi_u_key_encoding = true,
I am using wezterm on macos and it makes it work for me.
Thank you so much! This fixed it. Although the warning in the docs is a bit scary.
I'll try to prepare a small PR to add this to the README unless you'd rather leave it out.
Sure, a note about wezterm in readme would be good.
Longer term mprocs should work without it. But current architecture has some problems with handling terminal queries.