Re: [AD] Problems with ureadkey() under X |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Hi Michael:
Now I investigated it better:
> I think no. Some games need all keys to be accessible, so Allegro
> tries to get all key presses and releases and usually do all necessary
> translations itself.
Can it be optional?
> I think it is possible to instruct Allegro to
> combine some keys into accented character (have not tried it though).
But this will solve my particular problem, but my program (made with Allegro)
won't work in other systems.
> BTW, what does your program return when you try to enter accented
> character? Does it return both keys you type, or only one key, or
> something else?
Now I adde some printf to xwin.c and here is what I found:
1) When I press ' Allegro gets a key event message with code == 0x30 (no idea
what exactly means)
2) When I release it Allegro correctly gets the release event.
3) Until here Allegro doesn't report any key to ureadkey() (same for ureadkey()).
4) Now I press the a key.
5) Allegro gets an event with code 0x26.
6) Allegro reports unicode: 0x61, scan 0x01
7) I release the key and Allegro gets the release event.
As Allegro didn't report the first keypress I added this code to xwin.c:
len = XLookupString(&event->xkey, kbuf, sizeof(kbuf), &keysym, NULL);
And printed the keysym, it is 0xFE51, and that's "dead acute accent"
So in fact Allegro is decomposing the keystrokes, I see Allegro gets "this is an
acute accent, wait for the key" and then "a". But:
1) It harms my keyboard layout.
2) It doesn't help Allegro to recover the ' accent key.
In fact I can't:
1) Get accents.
2) Get the ' key (simple quote)!
It makes Allegro useless. My keyboard is using only single quotes (really needed
for C coding), but it could be even worst, most spanish layouts to use an
US keyboard for latin-1 also uses double quote, circumflex symbol, tilde and
reverse single quote. It means all these keys fails to work as the user spect
*and* aren't reported at all.
I know nothing about X and I know you know about it. Do you know if I can try to
fix it trying something?
SET
P.S. I'll investigate some more details.
--
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