Archive 17/01/2023.

Input Events won’t working in Qt

rbnpontes

Hi guys, i have a big problem. I make a simple Game Editor for my game in Urho3D, i need to process Input keys
but doesn’t working
i have embed Urho3D window using externalWindow, mouse events will working but Keyboard key not.
I’ve tried everything like Input->GetKeyDown() and by Events SubscribeToEvent()

TheSHEEEP

When you embed a window in Qt (or any UI lib for that matter), Qt takes care of all of the input events.
It kind of grabs the focus away from the original window.

I’m surprised that mouse is working, to be honest.

So what you will want to do is handle keyboard events within in Qt (which is pretty easy) and forward them to your game.

Eugene

I had the same problem. Check this:

rbnpontes

Thank’s for the help,I suspected that this was happening.

rbnpontes

I have tried to Call SDL_Push event, but don’t send event

Eugene

Do you mean that this solution doesn’t work? I haven’t tried it, but wanted to.

rbnpontes

Yep, this function doesnt working, only working if i use Engine event, like SendEvent(E_KEYDOWN)

Eugene

Then I must check it… I definetly need to make it work somehow.