Sitcky KeyDown

BlitzMax Forums/BlitzMax Bug Reports/Sitcky KeyDown

Hi,

On my laptop the Shift key is reported as pressed always if I do the following:

1) Press and hold right shift
2) Press and hold left shift
3) Release right shift
4) Release left shift

or vice-versa

Use code below to try it:

Graphics 640,480

While Not KeyHit(KEY_ESCAPE)

	Cls
	Local y:Int = 0
	For Local i:Int = 8 Until 256
		If KeyDown(i)
			DrawText "Key: "+i,0,y
			y:+ 20
		EndIf
	Next
	
	Flip
Wend

Is it just my keyboard?

Reported before?

oh!

Well, this is strange.

Windows only reports a 'shift key released' event when *both* shift keys are released!

Doesn't happen with ctrl/alt/win keys.

The only solution I can think of for this is to clear both left/right shift key states when any shift key release event happens. Urk.