wez / wezterm

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

Allow to disable Alt-Space opening menu on Windows #3509

Open bew opened 1 year ago

bew commented 1 year ago

Is your feature request related to a problem? Please describe. On Windows, Alt-Space opens a little menu windows with Restore, Minimize, Maximize, Close,... That menu is simply useless to me as I have many other ways to manage my windows more effectively.

I actually remember when you added the commit that 'restored' that behavior (it wasn't there at the beginning), and I remember thinking that that would annoy me one day. 👉 The day has come, I really want to use the Alt-Space binding in tmux/nvim configs when I'm ssh-ing to a server.

Describe the solution you'd like An option to disable this menu, or a way override Alt-Space keybind to act.SendKey{mods="ALT", key="Space"}.

Describe alternatives you've considered Using another key, but no 🙏

Additional context Nope

bew commented 1 year ago

Hi Wez ;)

I'd really like to have this in short-med term, what do you think would be a way forward for this? Option? Keybind override?

I've never developed on windows, could you tell me if setting up wezterm dev on windows is a pain-in-you-know-what? Or if it's mostly straightforward?

wez commented 1 year ago

wezterm dev on windows isn't too bad:

This it the bit of code of interest:

https://github.com/wez/wezterm/blob/99c9613966a73d5388344fd0df68d5977b493c7c/window/src/os/windows/window.rs#L2839-L2846

There are a couple of ways to deal with this:

AeliusSaionji commented 3 months ago

Amusingly, this works just fine.

{
  key = 'Space',
  mods = 'ALT',
  action = wezterm.action.SendKey {
    key = 'Space',
    mods = 'ALT',
  },
},

But imo this is a workaround- a proper fix would probably let users use the more logical action = wezterm.action.DisableDefaultAssignment