0

KeyRemap4MacBook seems to not be able to do this.

2 Answers 2

1

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.

1

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

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

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.

You must log in to answer this question.

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