Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The issue is pretty simple. Tildes have two forms:

  • The combining tilde, which is a diacritic (ñ, ã).
  • The "single" tilde, ~, notably used as a replacement for $HOME.

The French MacBook Pro keyboard uses the first one (Option + n or Alt + n - the option key is labelled Alt on a French keyboard). You have to press space to validate the single tilde (entering Alt+nthen spacewill output ~ (without a space after). It is an issue in application like Vim, where ~ changes the case. Using the French keyboard it will change the case for two letters, which is very annoying. What is more, I never used the tilde as a diacritic since I first touch a computer keyboard.

This is why I would like to remap this key. This question says that it's possible with Ukulele, but I wanted to know:

  1. Is it possible with KeyRemap4MacBook, which I also use?
  2. Is there another easy way to do it?


share|improve this question
I didn't find anything in, but you could add a remapping yourself in private.xml. It's not possible with DefaultKeyBinding.dict because dead keys can't be reassigned. – user495470 Dec 9 '11 at 21:47
The only viable option mentioned in this question was to create a new .keylayout with Ukelele: How to disable inputing characters like ãâà by default in OS X? I just want to simply type ~^` – user495470 Dec 13 '11 at 19:19
up vote 1 down vote accepted

You can use KeyRemap4MacBook to automatically add a space when you press Option+N

The syntax for sending multiple keystrokes is like this according to the manual:

  KeyCode::N, ModifierFlag::OPTION_L,  KeyCode::SPACE

This code will produce a ~ without behaving like a dead key (technically it still is).

If this still messes with VIM or other programs, you can let KeyRemap4MacBook switch input language to English on keydown, send a tilde, and then switch back to your regular language.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.