Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

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
up vote 2 down vote accepted

Have you tried Ukelele?

share|improve this answer
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

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

keyremap4macbook looks like it will do what you want. I haven't used it but those reviewing it at 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

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

<?xml version="1.0"?>
    <autogen>__ConsumerToKey__ ConsumerKeyCode::EJECT, KeyCode::KEY_0</autogen>

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .