Scroll lock on USB keyboard does not enable scroll lock

I have a Windows keyboard that attaches to a KVM that I use to control my Macbook Pro and my desktop. Pressing scroll lock twice on the KVM switches between the two computers. On the Macbook scroll lock is mapped to the decrease brightness button, and pause/break is mapped to increase brightness. I can switch between the two machines, but the screen changing brightness is a bit of an annoyance.

Is there a way to map the scroll lock button to using scroll lock on just the USB keyboard?


Solution 1:

Take a look at Karabiner. It isn't very user friendly for this level of customization but it has amazing power and flexibility.

The PrintScreen, Scroll Lock, and PauseBreak buttons are actually F13, F14, and F15. You would have to configure the custom private.xml with something like this. In this example, it will remap F14 (the Scroll Lock key) to nothing but only on a Microsoft Sculpt keyboard. It will continue to be the same on the MacBook's keyboard.

<deviceproductdef>
  <productname>SCULPT_ERGONOMIC_DESKTOP</productname>
  <productid>0x07a5</productid>
</deviceproductdef>
<item>
  <device_only>DeviceVendor::MICROSOFT,DeviceProduct::SCULPT_ERGONOMIC_DESKTOP</device_only>
  <name>Disable F14 on external keyboard</name>
  <identifier>private.external.disable.f14</identifier>
  <autogen>__KeyToKey__ KeyCode::F14, KeyCode::VK_NONE</autogen>
</item>

Read thru the docs regarding the device definitions and how to add your own if it isn't in the predefined list, as I've done in the example above.

The KVM switch will still detect the double Scroll Lock keypress and switch between systems.

Solution 2:

Under Keyboard, go to "Shortcuts", and then the Display group. Disable the two default shortcuts there, which map F14 and F15 to Decrease and Increase Brightness