Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My zero key on MBP (the one next to 9), is completely dead. No opening, cleaning, or anything else helps revive it. Anytime I need to press zero, I have to press Fn+M (the keypad zero). Even worse, every time I have to press ')' I have to find it somewhere and paste it.

Can somebody give me a complete solution to remapping 'eject' key (which I never use) to zero/) key? I need it to do 2 things:

  • type zero on press
  • type ) on shift+press

I'm on Snow Leopard, comfortable with terminal, running on zsh.

P.S. I looked through lots of remapping questions but none help me solve this.

share|improve this question

4 Answers 4

up vote 2 down vote accepted
+50

Have you tried Ukelele?

share|improve this answer
1  
I managed to map my Alt+9 to 0 and Alt+Shift+9 to ) using this tool, so it's almost perfect. However, it doesn't allow to remap eject key, especially to act as normal symbol key. I'll keep this open in case something crazy like this comes up, otherwise you get the bounty. Thanks! –  hakunin Jul 16 '10 at 8:22

keyremap4macbook looks like it will do what you want. I haven't used it but those reviewing it at MacUpdate.com seem to like it.

share|improve this answer
    
I just uninstalled it before asking. It allows mapping to certain hard-coded configurations, not to anything arbitrary. –  hakunin Jul 12 '10 at 19:33

contrary to your comment KeyRemap4Macbook can be used to solve at least part of your problem : use eject to type zero or ) on press. Just follow the instructions for NoEjectDelay & how to define your own rules (it's xml...). Don't know but by designing your own rules you might be able to even get shift + Eject to work... Just remember there is no autorepeat on the Eject key.

share|improve this answer

You can add custom settings in KeyRemap4MacBook by creating a private.xml:

<?xml version="1.0"?>
<root>
  <item>
    <name>ejectto0</name>
    <identifier>ejectto0</identifier>
    <autogen>__ConsumerToKey__ ConsumerKeyCode::EJECT, KeyCode::KEY_0</autogen>
  </item>
</root>

For example shift+eject is also changed to shift+0. ConsumerKeyCode::EJECT | ModifierFlag::NONE would only apply to eject without modifier keys.

Eject keys have a delay by default, but you can remove it with NoEjectDelay. It doesn't enable key repeat though, so this method isn't as useful for mapping eject to forward delete.

See the source for the key code values and predefined settings.

share|improve this answer

Your Answer

 
discard

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.