Re: [AD] Problem with key_shifts on Windows.

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


aj wrote:
> can these problems be demonstrated/or not  in the /examples/exkeys.exe ?

I just tried exkeys.exe (only under Windows 2000) and at first, the problem does not appear. However, on closer inspection of the code, the bit where it tests the key_shifts variable is immediately preceded by a ureadkey(NULL); I tried adding readkey(NULL) to my example program, and although it now stops and waits for a regular key (letter, number, etc) to be pressed before reading key_shifts, when I press a regular key, the key_shifts variable is updated with the correct state of the shift-keys. From this, I conclude that the windows version only updates key_shifts when a regular key is pressed, but the DOS version keeps key_shifts in sync with the state of the keyboard. If exkeys.exe had a portion where it just displayed the key_shifts variable without waiting for readkey(), then the problem will be demonstrated.

A manifestation of the problem where ESC does not work when the CTRL/ALT keys are 'stuck' in exkeys.exe is where I cannot press ESC to continue unless I press some other key first.

Also, in exkeys, when I press ALT-GR, in the table of keys on the right of the screen, it says I've pressed both ALT-GR and CTRL when I've not pressed CTRL. If CTRL is held down, the values for both ALT-GR and CTRL are correct. However, if I hold down RCONTROL when I'm holding down ALT-GR, then the indicator for CTRL becomes un-set, although if I'm holding down all 3 keys at once, the indicators are at their correct values. None of this happens with the regular ALT key.

I have a UK keyboard. According to the Windows Input-locales section of the regional options applet, the input-language is "English (United Kingdom)", and the Keyboard layout / IME is "United Kingdom".

BTW. I added the following lines inside the main loop of my test program

	if(keyboard_needs_poll())
	{
		poll_keyboard();
	}

and the results are still the same - even if I get rid of the if and just call poll_keyboard()


AE.





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