diff --git a/src/org/infinity/gui/converter/ConvertToBam.java b/src/org/infinity/gui/converter/ConvertToBam.java index 1b448d6a5..0b41cd425 100644 --- a/src/org/infinity/gui/converter/ConvertToBam.java +++ b/src/org/infinity/gui/converter/ConvertToBam.java @@ -1004,6 +1004,18 @@ public void keyPressed(KeyEvent e) { // List is set to single selection mode doWithSelectedListItems(listFilters, list -> filterRemove(), true, "Remove selected filter?", null); } + } else if (e.getSource() == tfFrameCenterX) { + if (e.getKeyCode() == KeyEvent.VK_ENTER) { + // Accept current input value + framesValidateCenterValue(tfFrameCenterX); + tfFrameCenterY.requestFocusInWindow(); + } + } else if (e.getSource() == tfFrameCenterY) { + if (e.getKeyCode() == KeyEvent.VK_ENTER) { + // Accept current input value + framesValidateCenterValue(tfFrameCenterY); + cbCompressFrame.requestFocusInWindow(); + } } } @@ -1226,9 +1238,11 @@ private JPanel createFramesTab() { tfFrameCenterX = new JTextField("0", 6); tfFrameCenterX.setToolTipText(tip); tfFrameCenterX.addFocusListener(this); + tfFrameCenterX.addKeyListener(this); tfFrameCenterY = new JTextField("0", 6); tfFrameCenterY.setToolTipText(tip); tfFrameCenterY.addFocusListener(this); + tfFrameCenterY.addKeyListener(this); cbCompressFrame = new JCheckBox("Compress frame"); cbCompressFrame.setToolTipText("Selecting this option activates RLE compression for the current frame(s)."); cbCompressFrame.addActionListener(this);