I type a lot Unix commands and I need often "~" and "`" which in U.S. keyboards are on the key under the escape key.

I'm now using an Apple spanish keyboard set to U.S. layout, and this key is mapped to the characters "§" and "±" instead. I can't find "~" and "`" anywhere, and I need them exactly at their usual place anyway.

Is there an easy way to remap the key that doesn't affect other users? (they use the Spanish layout). I'd rather not use apps like Karabiner that ask to "control my computer" as I don't know what else it does, if possible. Thanks.

  • Spanish keyboards have one key more than us keyboards, and the ~` key gets moved to the one just left of Z (marked <>) when you use a us layout. – Tom Gewecke Jul 24 '16 at 9:58
  • Thanks, it worked. I'd like to remap this key and swap its function with the other one though. Karabiner doesn't have this in the list of mapping. Any idea how to do it? – notuno Jul 24 '16 at 20:02
  • See the answer I posted below a few hours ago with the link – Tom Gewecke Jul 24 '16 at 20:12

I solve a similar problem using the free public domain utility Karabiner. This allows for extremely extensive remapping of single or multiple key presses (including control keys) to any specifiable Unicode character, plus other operations. It is frequently updated, and photos has an older version for much older versions of OSX. You'll need to play a little bit with some examples to get what you want, but there's also pretty helpful documentation.

It would probably be only a couple minutes work to create a custom layout that does what you need with the graphic interface of Ukelele.

http://scripts.sil.org/ukelele

I made a quick one you can get at

https://dl.dropboxusercontent.com/u/46870715/k/USMod.keylayout.zip

(but I can't test it because I don't have the right keyboard).

To install, put the .keylayout file in Library/Keyboard Layouts, logout/login, then go to system prefs/keyboard/input sources and use the plus and add buttons to add it (look in both English and Other categories), then select it from the input ("flag") menu in the menu bar.

  • Thanks, I'll try this. Sorry I didn't notice your second post. – notuno Jul 24 '16 at 22:17

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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