I am sucessfull in creating key pressed event for characters and numbers. But when I press any of the function key, the code doesn't detect it. I have used .getCharacter()
to get the key pressed. This is what I have done so far
@FXML
private void checkKeyTyped(KeyEvent e) {
System.out.println("Pressed key : " + e.getCharacter());
}
When I press any normal keys, it prints the key but when I press any special key like a function key or esc, it doesn't detect anything. Do I have to first get the ASCII
value of the key?