Remapping the eject key to forward delete

I have a compact keyboard, with no forward-delete key and a useless eject key (my mac has no dvd drive).

How can I map the eject key to perform a forward-delete?
I can’t seem to be able to capture the eject key press event.

Also, it would be great if I could additionally map fn-eject combo to “put computer to sleep”.

Any ideas?

Try using a Device Key trigger to see the eject key press.

The Fn key works as a hardware toggle that allows a single physical key (eg F1) to act as two distinct keys (eg F1 and Brightness Down). The Fn key is not a modifier (like Shift or Control). It does not apply to many keys other than the function keys, and cannot be used as part of a hot key or device key trigger. You could presumably use Control-Eject or Shift-Eject or something along those lines, but not Fn-Eject (unless it happens that the Fn-Eject key actually produces a different keystroke, which is possible, it depends on the keyboard).

1 Like

Peter you champ.
Instead of device key, I was tring to capture as hotkey.
NOOB mistake.

Also, instead fo the FN key, I decided to use CMD+EJECT for sleep…
Thank you.


I reactivate this thread because I remapped the eject key to forward delete on my Magic Keyboard a long time ago. But with Keyboard Maestro 8, it does not work anymore. It looks like my keyboard is no longer recognized by Keyboard Maestro.

What doesn’t work?

Try the new Help ➤ Assistance window and click on “Something expected is not happening” link and see if that gives you any clues.

1 Like

I restarted the engine. Working now.