[AD] Strange keyboard problem

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


Hi all... my first post, so please forgive me if its a stupid question.

I'm using Allegro with djgpp under MS-DOS, and I've written a little frontend for my MAME cabinet (yes, I know there are plenty out there, but none of them did exactly what I wanted, and I fancied having a go myself)

I have an odd keyboard problem... some of the keys appear to get "stuck", and some no longer function after a couple of in/out iterations.

The first problem is that when my frontend exits, if I used LCTRL to select the option - when the program returns to MS-DOS, the CTRL key appears to be stuck.  I need to manually reset my keyboard (hitting the CTRL, ALT, SHIFT keys on both sides at the same time).
My input loop is fairly simple...i.e.

if( key[ KEY_LCONTROL ] )
  return eExit;

I tried adding a clearbuf call before de-initialising the allegro lib but it doesn't seem to help

The second problem is when the frontend has run, and then launched MAME - after the second or third iteration of FE/MAME/FE/MAME/FE/MAME - the combination of pressing '5' and '6' within MAME to exit stops working (which is kinda important for me, since its installed in a cabinet with no keyboard)

Any clues or suggestions would be appreciated.  Perhaps there is a little DOS program out there somewhere that will reset the keyboard ?

Thanks

Dave






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