Thanks for replying so soon. I am using VK_ALT but when I press that during a game, the game will wait until I press something else before accepting more input - not just firing input but movement etc. Actually it seems to wait for me to press the ALT key again before resuming play. The game doesn’t freeze but it just doesn’t accept any key presses until I press ALT again. Weirdly pressing escape will also bring it out of ALT mode. This seems to tie in with the ALT key expecting another key. I usually avoid code samples because others are a bit more picky about coding standards 
I don’t usually use the ALT key on my keyboard so I have no idea what it’s proper behaviour should be.
private boolean isFireButton( int key ) {
if ( MameMode == 0 ) {
// normal PC controls
// weapons are switched using up/down keys
return key == KeyEvent.VK_CONTROL || key == KeyEvent.VK_SPACE;
} else {
// arcade cabinet controls where CTRL, ALT and space are all separate weapon fire buttons
if ( key == KeyEvent.VK_CONTROL ) {
WeaponMode = 0;
return true;
} else if ( key == KeyEvent.VK_ALT && MaxWeaponMode > 1 ) {
WeaponMode = 1;
return true;
} else if ( key == KeyEvent.VK_SPACE && MaxWeaponMode > 2 ) {
WeaponMode = 2;
return true;
}
}
return false;
}