public void keyPressed(){
if(key == CODED){
if(keyCode == LEFT){val--;}
if(keyCode == RIGHT){val++;}
if(keyCode == BACKSPACE) {System.out.println("Backspace Pressed");editManager.Append(new Edit(selected, EditTypes.DELETE));}
}
if(key == 'Z' || key == 'z'){
//TODO Add Z function
}
if(key == 'C' || key == 'c'){
try{
editManager.Append(new Edit(selected, EditTypes.COLOR, rgb));
} catch(NullPointerException npe){
System.out.println("Null selection");
}
}
}
Whenever I press delete, the console log for ‘Backspace Pressed’ doesn’t even show up, much less the Delete registers. I’m not asking about whether or not the Delete in the Edit will work, so please ignore any of the classes I wrote, but I was just wondering why the program doesn’t even detect a backspace, do I have to use delete?