Keyboard in version 3 (in NoMachine products and any other product derived from the same NoMachine version 3 software) worked in a completely different way, compared to version 4. In version 3 the keymaps of the client were uploaded to the agent X server, so that the X applications saw the same X keycodes as stored on the client. In version 4 the keycodes are sent by the client untranslated and the translation happens inside the target X server, according to the keymap selected by the user. This change is obviously for the better and allows the user to simply change the keyboard layout by selecting the keyboard in the control panel of the desktop environment. If you were running a previous version of NoMachine (or an alternative product based on the same NoMachine software), what we suggest is ensuring that you don’t try to load any special keyboard command on the client and that you don’t change the keyboard on the server upon running the NX session, for example to try to correct a keyboard problem encountered running an older NoMachine version.
Regarding your specific issue, you don’t specify which NoMachine version you run on the server, but we suggest you upgrade to the 4.0.366 since it included one fix that was specifically aimed at solving AltGr keyboard problems.