Interacting with a video game - Keyboard & LUFA
It is quite common for games to be quite slow at reading the keyboard.

The Leonardo's Keyboard.write() command is quite rapid. The OS can pick it up with its interrupt driven buffering, but games tend not to use that buffering so they can get more realtime key control.

The trick here is actually to slow down the Leonardo's sending, by not using Keyboard.write(). Instead you need to press the key, wait a moment, then release the key:

Keyboard.press('j');
delay(1);
Keyboard.release('j');


Increase the delay until it becomes reliable. It's hard to say what the delay should be.