Not received KeyPressed


#1

I have problem with the app. It is not receiving keyPressed if i don’t touch screan. I checked that it is send by java onKeyDown, but i don’t know where it is loosing. After touching screan everything is ok and keyPressed is calling.


#2

Most likely whatever component you’re using just isn’t focused. Try calling grabKeyboardFocus when the component is first visible?


#3

Thank You! It finally worked. I was trying that before, but I had to put it in wrong place.