Only thing I can think of is, are you pressing the tilde (~) ? That opens up the console in the campaign game (at least, it did in Rome and I think it's the same), but I'm not sure about battles. And I'm a bit hazy on how to close it - try typing exit, or escape, or quit. Possibly in caps. Or not.

Anyway, hope that helps...