Closed bsferrazza closed 1 year ago
Try changing https://wezfurlong.org/wezterm/config/lua/config/allow_win32_input_mode.html to false
Also, either one of send_composed_key_when_left_alt_is_pressed
or both of send_composed_key_when_left_alt_is_pressed
should be set to false to avoid using the OS alt-gr style composition when using the corresponding alt key, and allow wezterm to encode it as a meta key.
@wez unfortunately that didn't work. I originally wasn't setting the send_composedkey* values and leaving them at the default and it was still not sending Meta. I also tried using no config and setting allow_win32_input_mode to false and that didn't help. Here's the debug_key_presses with that set to false.
18:41:49.191 ←[32mINFO ←[0m ←[1mwezterm_gui::termwindow::keyevent ←[0m > key_event RawKeyEvent { key: Physical(LeftAlt), modifiers: ALT, phys_code: Some(LeftAlt), raw_code: 18, scan_code: 56, repeat_count: 1, key_is_down: true, handled: Handled(false) } 18:41:49.193 ←[32mINFO ←[0m ←[1mwezterm_gui::termwindow::keyevent ←[0m > key_event KeyEvent { key: LeftAlt, modifiers: ALT, repeat_count: 1, key_is_down: true, raw: Some(RawKeyEvent { key: Physical(LeftAlt), modifiers: ALT, phys_code: Some(LeftAlt), raw_code: 18, scan_code: 56, repeat_count: 1, key_is_down: true, handled: Handled(false) }) } 18:41:49.194 ←[32mINFO ←[0m ←[1mwezterm_gui::termwindow::keyevent ←[0m > send to pane DOWN key=LeftAlt mods=ALT 18:41:49.358 ←[32mINFO ←[0m ←[1mwezterm_gui::termwindow::keyevent ←[0m > key_event RawKeyEvent { key: Physical(W), modifiers: ALT, phys_code: Some(W), raw_code: 87, scan_code: 17, repeat_count: 1, key_is_down: false, handled: Handled(false) } 18:41:49.359 ←[32mINFO ←[0m ←[1mwezterm_gui::termwindow::keyevent ←[0m > key_event KeyEvent { key: Char('w'), modifiers: ALT, repeat_count: 1, key_is_down: false, raw: Some(RawKeyEvent { key: Physical(W), modifiers: ALT, phys_code: Some(W), raw_code: 87, scan_code: 17, repeat_count: 1, key_is_down: false, handled: Handled(false) }) } 18:41:49.360 ←[32mINFO ←[0m ←[1mwezterm_gui::termwindow::keyevent ←[0m > send to pane UP key=Char('w') mods=ALT 18:41:49.365 ←[32mINFO ←[0m ←[1mwezterm_gui::termwindow::keyevent ←[0m > key_event RawKeyEvent { key: Physical(LeftAlt), modifiers: NONE, phys_code: Some(LeftAlt), raw_code: 18, scan_code: 56, repeat_count: 1, key_is_down: false, handled: Handled(false) } 18:41:49.366 ←[32mINFO ←[0m ←[1mwezterm_gui::termwindow::keyevent ←[0m > key_event KeyEvent { key: LeftAlt, modifiers: NONE, repeat_count: 1, key_is_down: false, raw: Some(RawKeyEvent { key: Physical(LeftAlt), modifiers: NONE, phys_code: Some(LeftAlt), raw_code: 18, scan_code: 56, repeat_count: 1, key_is_down: false, handled: Handled(false) }) } 18:41:49.377 ←[32mINFO ←[0m ←[1mwezterm_gui::termwindow::keyevent ←[0m > send to pane UP key=LeftAlt mods=NONE
I do use mosh. I'm not sure if that could somehow be contributing to this issue, but doesn't seem as though it would.
It looks like wezterm never receives a key down event for alt-w
. Do you have some other software installed on the system that handles alt-w
, or that might do things when the alt
key is pressed?
@wez You were absolutely right. Used a Windows program called HotkeyDetective and found out that Alt-w was being processed by some Dell Display Manager tool. Thanks for your help.
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.
What Operating System(s) are you seeing this problem on?
Windows
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
wezterm 20230102-155114-67896f67
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
I'm using the current nightly Windows build of WezTerm to connect to my linux workstation. For some reason when I use the Alt key in a program like emacs, it isn't registered as a Meta keypress, much like Esc is. For instance, M-w is the copy command in emacs, and using Alt-w doesn't work. I didn't see any details on the website about configuration options that would correct this issue, and times I've used WezTerm in the past didn't require anything special from what I recall. Below is the debug_key_events output when pressing Alt-w.
To Reproduce
No response
Configuration
Expected Behavior
No response
Logs
Anything else?
No response