The problem is that this does not seem to fix anything. The first question someone will ask I believe I can anticipate. I placed this code in a ".java" file named "RepeatingKeyEventsFixer.java". This file is in "../src/com/example/". To use it in my code I have put the following lines at the beginning of my main() method:
RepeatingKeyEventsFixer repeatingkeyeventsfixer = new RepeatingKeyEventsFixer();
repeatingkeyeventsfixer.install();
[color=#000000]Still, when I press down a key, it tells me it's being pressed down and held, but it will also say it is being released with just about the same frequency. Does anyone have any idea what I may have done wrong? I have also posted this on StackExchange with poor results. I'll post the link here in case the way I phrased things there could help any more: http://stackoverflow.../8948238/596359
[color=#000000]The following code is the code I am using to test if a key has been released or not. I appreciate the time any takes to consider my question.
addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e){
processKey(e);
}
public void keyReleased(KeyEvent g){
processKeyReleased(g);
}
}
...
private void processKeyReleased(KeyEvent g){
int keyCode = g.getKeyCode();
if(!isPaused && !gameOver){
if(keyCode == KeyEvent.VK_LEFT || keyCode == KeyEvent.VK_RIGHT){
System.out.println("released");
player.stopLooping();
}
}
}