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

Alt+Space opens system menu instead of generating input #7865

Open
mbunkus opened this issue Mar 26, 2024 · 6 comments
Open

Alt+Space opens system menu instead of generating input #7865

mbunkus opened this issue Mar 26, 2024 · 6 comments

Comments

@mbunkus
Copy link

mbunkus commented Mar 26, 2024

On Windows I cannot get Alt+Space to send a key code. Instead the system menu is always opened. This is important insofar as Emacs uses Alt+Space. Other terminal emulators (putty, kitty, Windows Terminal) work fine with Alt+Space.

I've tried re-binding via the following, but to no avail:

[keyboard]

bindings = [
  { key = "Space", mods = "Alt", action = "ReceiveChar" }
]

System

OS: Windows 11
Version: alacritty 0.13.2 (bb8ea18)

Logs

Available here. I started Alacritty, pressed Alt, held Alt, pressed Space, the window's system menu appears. I release both keys, close Alacritty.

@chrisduerr
Copy link
Member

Is this not a standard binding on Windows?

@mbunkus
Copy link
Author

mbunkus commented Mar 26, 2024

It is. However, programs can & do intercept this combination in order to do anything. For example, the Windows Terminal, Putty & kitty all intercept it & pass it through to the running application (in my case: ssh & Emacs inside ssh). The key sequence generated is ESC space (^[ or 0x1b 20).

@mbunkus
Copy link
Author

mbunkus commented Mar 26, 2024

And before you ask, a binding inserting those chars doesn't work either. I've tried that already:

[keyboard]
bindings = [
  # other bindings, and this one:
  { key = "Space", mods = "Alt", chars = "\u001b\u0020" }
]

The window's system menu opens.

@chrisduerr
Copy link
Member

And before you ask, a binding inserting those chars doesn't work either.

Yes, system bindings are handled before keybindings. So this is to be expected.

@kchibisov Winit has no way to configure system bindings at this point, correct?

@kchibisov
Copy link
Member

@kchibisov Winit has no way to configure system bindings at this point, correct?

I think it's more like a hittest situation, we'll support it in the future, but not now...

@chrisduerr
Copy link
Member

I'll just mark it as a new feature for now, though we probably have some similar ones in our backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants