ghostty icon indicating copy to clipboard operation
ghostty copied to clipboard

Introduce `toggle_macos_option_as_alt` binding action

Open mitchellh opened this issue 1 year ago • 1 comments

As discussed here: https://github.com/ghostty-org/ghostty/discussions/2517

This is a feature of Terminal.app that seems worthwhile to add, both as a binding action and as a menu action to mimic Terminal.app. The default binding of option+command+O can also be copied from Terminal.app.

Since this is a binary toggle and macos-option-as-alt is not a binary configuration, I believe the behavior of the action should be as follows:

  1. Default the toggle to the value of the configuration. If macos-option-as-alt is true, it should show up checked.
  2. When untoggled, the value goes to false.
  3. When retoggled, the value returns back to the configured truthy value (if set) or true otherwise. This behavior lets the "on" behavior match what the user desired by default (left/right/true).

We should be clear in the documentation for the binding action how this behaves.

The discussion also noted a UI indication when this turns on and off. If we can get that in, that's great, but if not we can defer that to future work.

mitchellh avatar Oct 28 '24 21:10 mitchellh

Hi all,

I stumbled on this issue earlier today while exploring GNU Readline. Since @nico already has worked on this, would it be okay if I take a stab at adding the keybinding cmd + opt + o to toggle the Option key as Alt?

kshitij10496 avatar Nov 18 '25 11:11 kshitij10496