Keyboard keys not working on RPI platform

Hi all,

I just recently installed Urho3D on Raspberry Pi 3.
But the problem is that when I run each of the example games (./05_AnimatingScene for example), the games opens and I see the scene, but the keyboard keys don’t work, and I’m not able to move or do anything.
All I can do is Ctrl+C to quit, which sometimes doesn’t work either!!

How can I solve this !!?

Any suggestions !!?

Ctrl+C is a terminal command. If it sometimes does not work then likely something is wrong with your system. You should test on a fresh install and provide us information on build you are using. What flags you used to build it or if it was build from website, and what distribution is installed on PI. Maybe then someone with right combination can test this and verify if it is broken or not.

I have seen a few users reporting input problem in Urho3D 1.6. I am partly to blame for this. Ever since the SDL 2.0.4 update, I have not actually tested the build on an actual RPI board. My old RPI is now being used as a mini server and I didn’t want to mess with it at the time. Bought myself a brand new RPI 3 last month but I haven’t spent quality time with it yet. :laughing:

I think this is what happened. In the past before SDL 2.0.4 our RPI port still relied on the X11 for the input. After SDL 2.0.4 update, our RPI port does not use xinput anymore, if I recall correctly. It is a side effect from using SDL’s own CMakeLists.txt which auto-configures its configuration file. At that time I thought it is as intended and didn’t investigate it further.

Not sure if this is related, however I’ve been experiencing some issues with the EventSystem on Mac specifically where the events do not work… sometimes. UI elements, and everything else will load up at the start of the program, however no events will fire. This is currently a hard issue for me to duplicate since I’ve only seen it happen on OSX, and it doesn’t happen all of the time, just sometimes. Almost like a thread is running in the background and hasn’t fully completed.

Edit: Most of my development is done on a Windows machine which doesn’t seem to have the issue.

So, after all these, what can I do !?
Somebody suggested to check the /dev/input in the logs.
How can I see the logs of Urho3D !?

Any other suggestions !?

I think I have already given enough pointer on how to troubleshoot the problem. If you still do not understand how to do it then may be you can try the older 1.5 release instead while waiting the devs to fix this issue.

Ok. I’ll try version 1.5.

Just a question:
Which command must be executed instead of the following in the installation?

I installed the version 1.5.
But now it gives another error :

Now what should I do !!?

I just want to add what I have read from SDL readme file for RPI platform.


  • Works without X11
  • Hardware accelerated OpenGL ES 2.x
  • Sound via ALSA
  • Input (mouse/keyboard/joystick) via EVDEV
  • Hotplugging of input devices via UDEV

It seems the EVDEV does not pipe those input events correctly into our engine yet. Anyway, SDL 2.0.5 is just out now. Whoever does the SDL version upgrade later can double check this.

Ok, so for Mac I discovered something interesting. When the keys aren’t immediately working I noticed that if I wait 10-30 sec the UI and keys will start being responsive. Not sure if this helps, and again, I’ve only seen this so far on Mac, not Windows.

Whatever it is that causing your issue on Mac is off-topic in this thread. I have updated the thread’s subject to make this point clear.

Did this issue ever get resolved? I’m having trouble - the SDL text input event doesn’t seem to be triggering. (at least OnTextInput isn’t being called in UIElement subclasses)

Nothing has changed since then. I can confirm the issue exists though at the very least, however, I have limited free time now to investigate further and fix it. You are all welcome to give it a try.

Any suggestions for where/how to start fixing this/ narrowing down the problem?

I have mentioned this before.

The uglier solution is to add back X11 stack just in order to get the keyboard input. Note that this was what we have done in the past version. But I consider that to be a mistake. We should not depend on X11 if I understood the Release Notes from SDL correctly. Perhaps I have a wrong understanding though. The latter can be done by simply flipping a switch in the generated SDL_config.h (I think).

OK, so I solved the problem! Did some digging around, found this - so I swapped the SDL/src/core/linux folder with the one mercurial are using and rebuilt everything.

1 Like

Good to know that. Thanks.

I am having a strange problem with this now. The text input works until either CTRL or ALT are pressed. Once either of these keys has been pressed text input no longer works and the game needs to be closed and opened again to regain text input. Any ideas what could be causing this? Not sure where to look

This issue is now fixed in the master branch.