There is such a code, but for some reason, it does not work when you press "("
Although everything works fine on numbers, letters, and even if you take a square bracket, it also works, but along with the square box it also works on the letter under it. What is the problem? How to fix it? Why doesn't the regular bracket work? if the documentation is exactly LEFT_PARENTHESIS intended for opening brackets
myField.setOnKeyPressed((event) -> { if (event.getCode() == KeyCode.LEFT_PARENTHESIS) { System.out.println("Works!"); } }); Similarly, the option KeyCode.getKeyCode("(") also does not work