Question: On my MacPro there is one issue (and guys from Apple think this is feature...) that annoys me very much: there is a time delay between CapsLock switching. I used to do that fast. If I go to preferences and reassign caps lock to any other button and then back it works OK then, so it is not a hardware problem.

Is there any way to fix that ?

Answer: 
I was running the latest firmware on an Apple 2007 Aluminum Wireless Keyboard, and MacBook Pro Keyboard, but the issue still persisted. However, oddly this fixed it:

1. Open **System Preferences**
2. Click **Keyboard**
3. Click **Modifier Keys...**
4. Select your keyboard from the **Select keyboard:** list.
5. Set the **Caps Lock Key:** to **No Action**.
6. Press **OK**.
7. Ensure your Caps Lock no longer works on your keyboard.
8. Click **Modifier Keys...** again.
9. Set the **Caps Lock Key:** to **Caps Lock**.
10. Press **OK**.

Now, the Caps Lock key works instantly for that keyboard. Repeat as-needed for each keyboard you own.
1. Download and install the following software
	* Karabiner
	* Hammerspoon
2. Use Karabiner maps CapsLock key to F19.
3. Edit `init.lua` under the path `~/.hammerspoon`, paste the code below.

```lua
pressedF19 = function()
    hs.hid.capslock.toggle()
end

hs.hotkey.bind({}, 'F19', pressedF19, nil)

```

Then reload the hammerspoon config for changes to take effect.

See my blog here <http://hellohtml5.com/2019/04/25/best-way-to-disable-capslock-delay-on-mac/>