Thanks!
Oh, the cursor must be locked. But I did an additional check on unpause. Also, I added a right stick support and some other missing buttons. Haha, very unusual on the gamepad :D