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

Overridding "Command-H" doesn't work on MacOS after migrating from 12.x to 13.x. #7689

Open
sstepashka opened this issue Feb 4, 2024 · 7 comments

Comments

@sstepashka
Copy link

I used to have this config in my previous (12.x):

key_bindings:
# See https://en.wikipedia.org/wiki/C0_and_C1_control_codes for codes
- { key: H, mods: Command, chars: "\x08" }
...

I rebind most of Command+<key> to behave like Control+<key>, the above-mentioned control sequence allow to type Command+H for Emacs to open help, but now it's overridden to hide the window and seems like after migrating to TOML format of the config it didn't change:

[[keyboard.bindings]]
chars = "\b"
key = "H"
mods = "Command"

I am not sure what alacritty migrate does in this specific case.

Also, the following is broken:

  # Frequently, terminals send Ctrl-Space as Ctrl-@ and according to the wiki escape codes it is just '\x00'.
  # From that point, Emacs would recognized both Ctrl-@ and Ctrl-Shift-Space as the same.
  - { key: Key2,   mods: Shift|Command, chars: "\x00" }
  - { key: Space,  mods: Shift|Command, chars: "\x00" }

In 12.x, Command-@ (Command-Shift-2), used to work as well, but it doesn't work on 13.x anymore.

I am pretty sure there is a bunch of more broken bindings, it's just the beginning :)

@sstepashka
Copy link
Author

But this, kind of weird, configuration works:

[[keyboard.bindings]]
chars = "\u0000"
key = "@"
mods = "Shift|Command"

where the following ones do not work as expected:

[[keyboard.bindings]]
chars = "\u0000"
key = "2"
mods = "Shift|Command"
[[keyboard.bindings]]
chars = "\u0000"
key = "@"
mods = "Command"

Seems like, now Alcritty requires the shift to be present in the character and modifier as well.

@sstepashka
Copy link
Author

I was able to fix the broken Command-H with a hack from #6136, but having a custom binding for "Hide alacritty" on mac os level.

@sstepashka
Copy link
Author

This one doesn't work as well:

[[keyboard.bindings]]
action = "IncreaseFontSize"
key = "Equals"
mods = "Control|Shift"

@sstepashka
Copy link
Author

But after changing to this it works:

[[keyboard.bindings]]
action = "IncreaseFontSize"
key = "Plus"
mods = "Control|Shift"

@chrisduerr
Copy link
Member

Does it do both your custom binding and hide, or only hide?

@sstepashka
Copy link
Author

Only hide.

@kchibisov
Copy link
Member

I think the app menu stuff blocks it, so we'll have to communicate to e.g. winit to not provide menu items for such bindings or manually specify menu items based on the bindings we have.

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