1. open a game with debugging.
2. run the code
[] spawn {XS_counter = 0; (findDisplay 46) displayAddEventHandler ["KeyDown", "hint format [""working:%1"",XS_counter];XS_counter = XS_counter +1;"];};
3. press any key to check if it works. A hint will appear counting every key press or while holding any key down it will continue counting.
4. Save&Exit game.
5. Load game.
6. Try pressing any button and you should see that it no longer works.