[AD] Problems with ureadkey() under X

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hi All!

  I need to get my lovely accents with Allegro.
  My X system is configured to combine ' key with some others to create some
Latin-1 characters. It works for any X application.
  So I tried it with Allegro:

#include <allegro.h>

int main(void)
{
 int key, scan;

 set_uformat(U_UNICODE);
 allegro_init();
 install_keyboard();
 set_gfx_mode(GFX_AUTODETECT,320,200,0,0);
 do
   {
    key=ureadkey(&scan);
    printf("Unicode: 0x%04X Scan: 0x%02X\n",key,scan);
   }
 while (scan!=KEY_ESC);

 return 0;
}

END_OF_MAIN();

But it doesn't work, in fact key is converted to ASCII!!!
What's the error? I can look the code right now, so the questions are:

1) The code is ok?
2) Is that supposed to work?

SET

--
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Visit my home page: http://welcome.to/SetSoft or
http://www.geocities.com/SiliconValley/Vista/6552/
Alternative e-mail: set@xxxxxxxxxx set@xxxxxxxxxx
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/