I use the key LEFT and RIGHT to move the position of my view. When I press and hold down the key the view moves to the side, pauses a short time, and then keeps moving until I release the key. Is it possible to skip the pause between the first action and the actions afterwards?
gridPane.setOnKeyPressed(
e -> {
e.consume();
if (e.getCode() == KeyCode.RIGHT)
{
moveMarkerNextPositionWithKeys(e.isAltDown());
}
else if (e.getCode() == KeyCode.LEFT)
{
moveMarkerPreviousPositionWithKeys(e.isAltDown());
}
}
);