src/main/java/seedu/address/ui/CommandBox.java
@FXML
    private void handleKeyPress(KeyEvent keyEvent) {
        switch (keyEvent.getCode()) {
        case UP:
            // As up and down buttons will alter the position of the caret,
            // consuming it causes the caret's position to remain unchanged
            keyEvent.consume();
            navigateToPreviousInput();
            break;

        case DOWN:
            keyEvent.consume();
            navigateToNextInput();
            break;

        case TAB:
            keyEvent.consume();
            processAutocomplete();
            break;

        default:
            // let JavaFx handle the keypress
        }
    }
/**
     * Handles the key press event, {@code keyEvent}.
     */
Handles the key press event,  keyEvent.
Handles the key press event keyEvent .
@FXML
    private void handleKeyPress(KeyEvent keyEvent) {
        switch (keyEvent.getCode()) {
        case UP:
            keyEvent.consume();
            navigateToPreviousInput();
            break;
        case DOWN:
            keyEvent.consume();
            navigateToNextInput();
            break;
        case TAB:
            keyEvent.consume();
            processAutocomplete();
            break;
        default:
        }
    }
@ FXML private void handleKeyPress ( KeyEvent keyEvent ) { switch ( keyEvent . getCode ( ) ) { case UP : keyEvent . consume ( ) ; navigateToPreviousInput ( ) ; break ; case DOWN : keyEvent . consume ( ) ; navigateToNextInput ( ) ; break ; case TAB : keyEvent . consume ( ) ; processAutocomplete ( ) ; break ; default : } }
Handles the key press event, {@code keyEvent}.
Handles the key press event { @code keyEvent } .
// As up and down buttons will alter the position of the caret, // consuming it causes the caret's position to remain unchanged // let JavaFx handle the keypress