What can I do with the eject key on a Magic Keyboard?

Apple’s Magic Keyboard is an excellent wireless keyboard for Macs. However, until last year, the Magic Keyboard still shipped with an eject button in the top-right corner, despite Macs not having optical drives for many, many years! So what can you do with the eject key on the Apple Magic keyboard instead of spitting out discs?

Apple Magic Keyboard Eject Button
Yes, that is an eject button that you spy!

Let me introduce you to Karabiner-Elements. This is free, open-source software that lets you customise your keyboard. It can put that eject key to good use but also do far, far more.

Time needed: 5 minutes

How to use Karabiner-Elements to re-map your eject key

  1. Download and install the software

    Download Karabiner-Elements from the company’s website and install (there are installation instructions here if you get stuck).

  2. Set up mapping for the eject key

    Launch Karabiner-Elements and you will be presented with a preferences screen.

  3. Make sure you’re modifying the Magic Keyboard

    Click on the Devices tab and ensure that your Magic Keyboard has been selected.

  4. Install a Complex Modification

    By default, the Eject key can’t be mapped. To achieve what we want, we need to install a Complex Modification. If you click on the tab by that name and select Add Rule and then Import more rules from the internet, it will take you to a web page where you can find various rules that can be installed. Search for “eject”, for example, to find a list of suitable options. I use the one named “Lock Screen”. Click the Import button to the side and it will add it to Karabiner-Elements. Karabiner Elements Search Screen

  5. Activate your rule

    Karabiner-Elements will ask you to confirm the import. Click on the Import button to do so. You will now be shown a list of all your rules – enable any that you now wish to use. In my example, you’d click Enable against the rule “Eject to Lock Screen”.Karabiner Elements Enable Rule

  6. Confirm the set-up

    It will now show the new rules listed in the “Complex modifications” tab. Nothing more is required and pressing the eject button should perform the action that you’ve set up.Karabiner Elements Rule List

The above shows you how to re-map the eject button but the software can be used for much, much more. Simple re-mapping rules can be easily set, without the need for rule imports, or you can make use of the web search to find some quite complex features.


Recommended reading: How do I create a keyboard shortcut to start a Mac screensaver?


David Artiss
David Artiss

David Artiss works for WordPress VIP as a Customer Success Support Lead (EMEA). He's also a writer on his own blog as well as The Big Tech Question, and a frequent appearance on the PC Pro podcast.

NEXT UP