I told you yesterday about this. It's because you need to bind it to the global map.
GlobalActionMap.bind(keyboard, "x", pushTestgui);
Keep in mind that you need to make sure that you don't override someone else global bind.
Also, please don't change the topic title due to a new question. Instead, create a new thread and lock the old one.