logo

How to solve Alt key binding issue on macOS?

Posted on
Authors

Solution for binding Alt + {key} hotkeys.

Problem

If you are using macOS, you can experience this issue each time you press any hotkey which contains Options.

For example, Options + a will print å in your text editor.

Root cause

Those output characters is pre-defined by the keyboard input method.

Almost users use the U.S keyboard layout which cause this issue.

Solution

  1. All apps:

Change the keyboard input method. You can try this keyboard input method: Unicode Hex Input.

  1. Alacritty 0.12+:

Add this option to your Alacritty config:

window:
  option_as_alt: OnlyLeft # other values are None, OnlyRight, Both
window:
  option_as_alt: OnlyLeft # other values are None, OnlyRight, Both