5

I am using Terminal version 2.5, where I have two requirements:

  1. I need to be able to type the Meta key.
  2. I need to be able to type the # character, too (Option+3 for the UK keyboard layout)

How can I satisfy both of these? By default, (2) is satisfied, but (1) is not. I can then turn on "Use Option as Meta key", which satisfies (1), but breaks requirement (2).

How can I have both? (It shouldn't be so hard for me to just be able to type.)

Edit: what I'm looking for, for example, might be a way to just "Use Option as Meta key" for the left/right Option key, or a way to override the "Use Option as Meta key" for the sole exception of the # character.

Kevin E
  • 367

4 Answers4

4

iTerm 2 can be configured to only use one option key as meta:

Lri
  • 105,117
  • Thanks. I found that iTerm's behavior here is somehow buggy; it stopped treating Option as Meta at some point during a session. In the meantime, I've switched to using a graphical version of Emacs which fixes my problem. – jameshfisher Nov 13 '14 at 15:42
1

For requirement 2 you can choose to make the keyboard an Australian one. The only difference between UK and Australian i alt3 and shift3. For UK they give # and £ and vice versa for Australian. This means that for an Australian keyboard # is shift3 as it is for a US or under Windows or Linux.

To change the keyboard layout (under Yosemite) got System Preferences->Language & region - hit the Keyboard Preferences button and use + to add Austrailian to the left hand column

mmmmmm
  • 30,160
1

I have built a solution myself and it doesn't require abandoning Terminal.app in favour of iTerm 2.

It is a simple status bar app that runs in the background and rewrites all left Alt + $KEY key events to two key events in rapid succession, Esc, then $KEY; however, it only does this if Terminal.app is in focus.

You can find the source for the app here. You'll need Xcode to build it.

0

I finally figured out how to do this by code:

https://stackoverflow.com/questions/30336086/make-shift3-produce-not-%C2%A3-on-osx-by-code

If you have developer tools, you can compile & run that from the commandline.

P i
  • 1,745