3

I just got a new keyboard. How can I remap the FN key on only this external keyboard to option?

So far I've played around with karabiner but haven't had success.

1 Answer 1

1

One Excellent third party tool that can make amazing edits to the keyboard mapping is named Karabiner.

To accomplish option and function key changes, create a filter for the external keyboard and adjust the modifier keys.

Prerequisites: external keyboard

  1. Download, install and open Karabiner
  2. Open in the menulet Karabiner -> Preferences
  3. Open the tab Misc & Uninstall
  4. Hit the button Launch EventViewer
  5. Hit the tab Devices
  6. Make a note of the vendor and product ID of the external keyboard:

    enter image description here

  7. Hit the tab Main

  8. Enter the (PC-)Ctrl-key, (PC-)Fn-key and the (PC-)Alt-key and make a note of the "event names/miscs":

    enter image description here

  9. Close the EventViewer

  10. Hit the button Open private.xml
  11. Open the file private.xml with an appropriate editor
  12. Enter the customized keycode and replace the vendor name, the product name, the vendor and product ID by IDs and names found above as well as the "names/miscs" of the events (= KeyCode).

    <?xml version="1.0"?>
    <root>
      <devicevendordef>
        <vendorname>Cougar</vendorname>
        <vendorid>0x05ac</vendorid>
      </devicevendordef>
      <deviceproductdef>
        <productname>ATTACKX3</productname>
        <productid>0x0256</productid>
      </deviceproductdef>
      <item>
        <name>Function to Option for ATTACKX3</name>
        <identifier>private.fn2optExtK</identifier>
        <device_only>DeviceVendor::Cougar, DeviceProduct::ATTACKX3</device_only>
        <autogen>__KeyToKey__ KeyCode::Fn, KeyCode::OPTION_L</autogen>
      </item>
    </root>
    

    Depending on your findings in the Event Viewer you may have to remap (PC-)keys to Control_L and Command_L also.

  13. Save the file

  14. Open in the menulet Karabiner -> Preferences the tab Change Key
  15. Hit the ReloadXML button
  16. Enable the remapping. It should be listed at the beginning.
3
  • Thanks for your answer. Unfortunately, I'm failing at step 8. When I press the FN key I see no events in the EventViewer main tab. (I do see events correctly when I press CMD and CTRL). So I think the FN key isn't mapped to anything. Commented Mar 1, 2016 at 19:11
  • @StevenWexler Did you disable Hide ignorable Events in Event Viewer -> Preferences?
    – klanomath
    Commented Mar 1, 2016 at 19:25
  • Yep, that option is disabled. Commented Mar 1, 2016 at 19:48

You must log in to answer this question.

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