0

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?

Thanks!

charlax
  • 103
  • 5
  • I didn't find anything in http://pqrs.org/macosx/keyremap4macbook/list.html, but you could add a remapping yourself in private.xml. It's not possible with DefaultKeyBinding.dict because dead keys can't be reassigned. – Lri Dec 09 '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 ~^`](http://superuser.com/questions/191424/how-to-disable-inputing-characters-like-aaa-by-default-in-os-x-i-just-want-to-s) – Lri Dec 13 '11 at 19:19

1 Answers1

1

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:

<autogen>
  __KeyToKey__
  KeyCode::N, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_OPTION,
  KeyCode::N, ModifierFlag::OPTION_L,  KeyCode::SPACE
</autogen>

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.

Adam Wern
  • 26
  • 1