我使用 LEFT 和 RIGHT 键移动视图的位置。当我按住键时,视图会移到一边,暂停一小会,然后继续移动,直到我松开键。是否可以跳过第一个动作和之后的动作之间的暂停?
gridPane.setOnKeyPressed(
e -> {
e.consume();
if (e.getCode() == KeyCode.RIGHT)
{
moveMarkerNextPositionWithKeys(e.isAltDown());
}
else if (e.getCode() == KeyCode.LEFT)
{
moveMarkerPreviousPositionWithKeys(e.isAltDown());
}
}
);
米琪卡哇伊
相关分类