ALLEGRO_EVENT_KEY_CHAR not firing
Ariesnl

Could it be that ALLEGRO_EVENT_KEY_CHAR is not triggered in Allegro 5.0.10 release version ?

ALLEGRO_EVENT_KEY_DOWN and ....._UP work just fine.
also in the debug version ( linked with debug allegro) the ..._CHAR event works just fine.
I removed all optimizations with the same results...

I can work around it for now, but for anything where the user must type this will be a problem...

Edgar Reynaldo

Why are you using 5.0.10? That is super old. Join the future. Allegro 5.2.1.1 is here...

Ariesnl

It's the one that is on Allegro.cc in binary format..
but maybe I'll have to upgrade ... I just hope I can build it without any hastle....
I usually never switch libs in the middle of something..
(and i was low in production for some time..... )

Edgar Reynaldo

I offer binary distributions for MinGW and Allegro 5.2.1.1. All you have to do is extract them with 7-zip and set your paths.

https://www.allegro.cc/forums/thread/616446

Ariesnl

That is nice !
Thanks !
:-)

Edgar Reynaldo

Try out ex_keyboard_events, and see if it functions properly...

All the example programs are included with my distro, and there is a batch script to setup an environment to run the example programs in the root directory of the archive. Does ex_keyboard_events work for you?

André Silva

Debug versus Release problems almost always mean you have uninitialized variables. Or maybe Allegro does. If an update to 5.2 fixes it, then great, but if not, something a lot weirder might be going on. Also, that event will only really trigger for characters, not for the likes of Shift or Ctrl (...right?). You probably already know this, but just in case you're trying to press L when on Debug and pressing Right Ctrl when on Release, I think I might've found your problem!

Thread #616541. Printed from Allegro.cc