trap all input?
Blitz3D Forums/Blitz3D Programming/trap all input?
| ||
OK I know this is probably a simple question... but here goes... I want to TRAP all input from the PS2 keyboard... this would include NON-ASCII keys... It would also include a MAG STRIP reader on the keyboard that essentially just loads the keybuffer and squirts the info out as keyboard is polled by program... Is there a way I can read the keyboard buffer? This isn't some hack job... I have to test POS keyboards and can't seem to read anything other than the ASCII set. Rook |
| ||
you can try keydown 0 to 255. Something like while keydown(1)=0 for i=0 to 255 if keydown(i) then print "you pressed key n."+i next wend |
| ||
Hey! That seems to do the trick! Thanks JFK |
| ||
Replace keydown with keyhit, it will tell you if it was hit, not if it is being pressed at the exact same moment you happen to be calling keydown()...While KeyDown(1)=0 For i%=0 To 255 If KeyHit(i%) Then Print "you pressed key n."+i% Next Wend |
| ||
Vinylpusher... (interesting name by the way! :) ) That lets me see a better image of what is read by the MAG STRIPE from the keyboard... YAY! Now if I could just read F13, F14, and F15 all would be wonderful... Thanks Rook |
| ||
Hmm, F13, F14 and F15 should be scancodes 100, 101 and 102 respectively. Does nothing happen when you press those keys (no scancode at all)? You might find this useful at some point. |
| ||
nada occours... I have an older OmniKey/PLUS keyboard... My dads... I love it! The keys have just the righr click and crispness to them... This is hard to find nowadays! Does anyone know how big the keyboard buffer is? RZ |
| ||
FIXED IT: Wasn't explaining things correctly to my tired old brain... Thanks for the scancodes! RZ |
| ||
Fair play :) |