0

I can't find a way to unmap or remap the key sequence Ctrl-6 on a MacOS terminal. It just emits a beep everytime I press it. How can I change this behavior.

On iTerm2 on MacOS, pressing Ctrl followed by 6 delivers a Ctrl-^ to the application running inside iTerm2. Which is actually what I want. Not sure if there's a way to get that on the default MacOS terminal. On the latter, I have to press the shift key in the middle to get Ctrl-^.

1 Answer 1

0

By default the MacOS terminal beeps whenever an invalid character for a VT100 type terminal is pressed (https://support.apple.com/en-gb/guide/terminal/trml35615/mac). As Ctrl-6 isn't a valid VT100 or ASCII control character, it beeps.

MacOS defaults to requiring the Shift to get Ctrl-[symbols] on the number keys so that they can't be confused with different terminal types that can pass through Ctrl-[numbers] and (likely) to simplify handling for multiple keyboard layouts.

The Ctrl-6 being remapped to Ctrl-^ is actually a common feature of terminals, but isn't standard or guaranteed.

In the terminal profile settings, you can adjust the terminal type to find one that supports Ctrl-6 (if there is one).

AFAIK, there isn't another way to remap control characters on the MacOS terminal as shortcut customisation is for those that affect the app and not those that get passed through to the terminal instance.

See also:
https://support.apple.com/en-gb/guide/terminal/trmladvn/2.13/mac/13.0
https://support.apple.com/en-gb/guide/terminal/trml107/2.13/mac/13.0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .