I bought a cheap Chinese replacement keyboard for my late 2007 MBP. The close square/curly bracket key actually sends a left control signal to the Mac. So I'm trying to remap my backslash/pipe key to be close square/curly bracket but I can't find the key remapping software to do it. Double Command and KeyRemap4Macbook can't do arbitrary key remaps and uControl/fkeys don't work on Snow Leopard. Anyone have ideas? I have no problem editing text config files if necessary.


Use Ukelele to create your own keyboard layout.


You can add custom settings in KeyRemap4MacBook by creating a private.xml. Try something like this:

<autogen>__KeyToKey__ KeyCode::CONTROL_R, KeyCode::BRACKET_RIGHT</autogen>

See my website for more information about KeyRemap4MacBook, custom keyboard layouts, and DefaultKeyBinding.dict:


  • Yeah - I left the close square bracket key as-is and reassigned the backslash/pipe key. As far as the laptop is concerned, the close square bracket key is a physical left control key. – Mason Mar 15 '11 at 13:31
  • @Lri - second link is broken – studgeek Dec 2 '13 at 4:02

I recommend to use karabiner You can remap all keys as you want.


You can try this method of using applescript to map keys differently.

  • It just opens the Keyboard preference pane in system preferences, where the assignment of modifier keys can be changed. That person's problem is that he wants to switch the setting regularly, therefore uses GUI scripting. That dialog is far from "arbitrary key remaps" though. – Daniel Beck Mar 13 '11 at 23:40

KeyRemap4MacBook might be useful as well.

  • My post specifically states that it does not work for what I'm doing. – Mason Mar 15 '11 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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