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?

有帮助吗?

解决方案

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.

其他提示

Simplest might be to unmap the 'special functions' & go back to having standard F-Keys for the Mac…

System Prefs > Keyboard > Keyboard

enter image description here

A great solution (which I use) is USBOverdrive (http://www.usboverdrive.com/USBOverdrive/News.html) You simply install it, mash all the special functions on your keyboard and it should automatically assign the key the right function but you can change it manually. Hope this helps!

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

None of the answers above were working for me (MacOS Mojave), so I wrote up a simple tool to send the double scroll lock signal to my KVM – it can even be assigned to a key combo: https://github.com/benjaminstout/osx-kvm

许可以下: CC-BY-SA归因
不隶属于 apple.stackexchange
scroll top