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

KeyRemap4MacBook seems to not be able to do this.

share|improve this question

We can try to find out what binary data your keyboard is sending and find alternate key combos that do the same thing.

I'm using Ubuntu 10.04 so please forgive me if this is completely irrelevant.

  1. Press ctrl-v to start inserting a control character
  2. Press the eject key since this is the button who's control character we wish to learn
  3. Copy the text that it put on the screen when you pressed the eject button.
  4. Close the terminal

When I follow this sequence for keyboard buttons like the enter key and backspace and the escape key I get the following results:

Esc = ^[

Enter = ^M

Backspace = ^?

The caret "^" represents the ctrl button on the keyboard and the character following it represents its self.

This means I can hold down the ctrl button and press the "[" button and it will send the Esc key for me. I can hold down the ctrl button and press "M" (without shift) and it will send the Enter key stroke. I can hold down the ctrl key and press the ? key (without shift) and it will send the backspace key.

Hopefully with this method you will help you find a similar sequence for the eject key.

I know its not an "arbitrary" sequence of keys but I hope you find this interesting anyway.

share|improve this answer

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

<?xml version="1.0"?>
    <autogen>__ConsumerToKey__ ConsumerKeyCode::EJECT, KeyCode::KEY_1, KeyCode::A, ModifierFlag::COMMAND_L</autogen>

Eject keys have a delay by default, but it can be removed with NoEjectDelay. It doesn't enable key repeat though, so this method can't really be used to map 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 .