I am learning Slick2D, which serves my purposes of 2D Java programming perfectly. Sorry, I have a problem. I don’t think this is Slick2D specific, since I think the same thing happens with Java Graphics 2D.
In Ubuntu (I use Ubuntu 12.04), pressing the Alt key shows "Dash Home", the same as clicking the top left icon on the screen (Windows users "Dash Home" is a kind of "Start menu).
When my application starts, the Alt key still has this behavior and shows Dash Home. When my game is running in windowed mode, this is not very important, as I can go into a pause state. However, when in full-screen mode this is a big problem, because the system leaves full-screen mode, and switching between full-screen and window windows takes a lot of time and, roughly speaking, ugly.
So the question is: how can I prevent the Alt key from being pressed to access the OS without opening Dash Home? In my code, I process keyPresses through a listener provided by Game2D, and I don't call any superclass method, so presumably keypress should not be reported to the OS. But it is so.
I am not attaching any code since I do not think this is related to Slick2D, but a common problem with Java. Any idea?
Thanks!
Edit: The problem still persists. I have placed here all the source code and binaries of the project here . If this does not help to find a solution to this issue, it can serve as a basic Java programming guide for other people.
source share