I have searched everywhere for a fix to the keyboard CAPS LOCK bug for NoMachine, but I cannot seem to find any.
The issue is that the CAPS LOCK is acting extra weird where it turns itself on and off at irregular times (even when not requested), not turning at all, or it may get stuck at one state.
I am using both of client/server on Mac OS High Sierra and Windows 10, and I tried connecting between Mac-Windows, Windows-Mac, and even Windows-Windows with another Windows 10 device, and the issue still persists. I assume this issue happens on Linux client/server as well.
Although the bug report that NoMachiner mentioned in a comment has been closed with the comment "Resolved in version 6.10.12 released on 2020-05-12.", this issue still seems to be present in version 6.11.2, although it doesn't happen every time.
The way I fix it is to give focus to any application other than NoMachine, toggle the caps lock and then return to NoMachine. It seems that for some reason, while NoMachine has focus toggling Capslock will always toggle it, but when NoMachine doesn't have focus, it will only toggle the capslock if the state has changed. Very strange, and very annoying.