Keypressevent focus window
I try to make a program that reads all the keyboard inputs. But now at first i only can read special caracters like enters and after a first enter i can read other keypresses. (the event wont activate before the enter)
when i push a button at the window and then try to read characters it works fine. But if i go to another window and back to the program it doesnt work anymore until i push the button again.
so i think it has something to do with active window. How can i resolve this
Since you are not telling how you did it, it can be many things.
Have a look at this. it uses a global event filter. Might be of use to you.
Remember to install it as eventFilter