KeyDown() with Shift keys
Archives Forums/Blitz3D Bug Reports/KeyDown() with Shift keys
| ||
First, I'm not sure if this is a problem with Blitz, or maybe more to do with Windows and my keyboard (USB Logitech G11) The following code should be self-explanatory in it's application: Scancode 42 is for the Left shift key Scancode 54 is for the Right shift key Accessibility functions are disabled, Caps Lock remains OFF. While Not KeyDown(1) Cls FlushKeys() Text 0,20,"LShift "+Str(KeyDown(42)) Text 0,40,"RShift "+Str(KeyDown(54)) Flip Wend End When running the code, all seems well at first, however, if I hold DOWN one of the shift keys for a second or so, then, while keeping it pressed, press the other shift key and hold it, finally, releasing the first one after another second or slow, and eventually, releasing the second. So, to summarise: Hold Down Key 1 Wait 1 second Hold Down Key 2 Wait 1 second Release Key 1 Wait 1 second Release Key 2 Wait 1 second The result, and possible bug, is that the first key will still show as '1' (i.e being pressed) after both keys are released, until it is later pressed and released again. |
| ||
Same here... Except that in my case (not sure if you meant this as well) the second shift key doesn't register as being pressed. |
| ||
Yeah, I didn't think it mattered, but that, too, was same for me, only one shift key is registered at a time. |