How to get keypress in UI only mode?

Another option is to only “Disable Input” on Controlled Pawn.