public byte[] getCursorMoveSequence(int direction, int times) {
        byte[] sequence = null;

        if (times == 1) {
            sequence = new byte[3];
        } else {
            sequence = new byte[times * 3];
        }

        for (int g = 0; g < times * 3; g++) {

            sequence[g] = ESC;
            sequence[g + 1] = LSB;
            switch (direction) {
                case TerminalIO.UP:
                    sequence[g + 2] = A;
                    break;
                case TerminalIO.DOWN:
                    sequence[g + 2] = B;
                    break;
                case TerminalIO.RIGHT:
                    sequence[g + 2] = C;
                    break;
                case TerminalIO.LEFT:
                    sequence[g + 2] = D;
                    break;
                default:
                    break;
            }
            g = g + 2;
        }

        return sequence;
    }// getCursorMoveSequence