TerminalView.Goto (gb.form.terminal)
Sub Goto ( X As Integer, Y As Integer )
Move the cursor to the specified position.
Goto moves the cursor "internally" to the TerminalView.
Meaning the TerminalView knows where the cursor is but the program running in the terminal may not.
For example if you are using the TerminalView to run a bash shell session you could move the cursor on the current command line using Goto but then when pressing left or right keyboard arrow keys you will find the running bash session does not know it has moved causing unexpected results.
To move the cursor in an active bash command line you should emulate real left or right arrow key presses using the relevant escape sequence.
Eg...
'' Emulate normal keyboard cursor movement within the current shell command line.
Public Sub MoveCursor(hView As TerminalView, iKeyCode As Integer, Optional Len As Integer = 1)
Dim sText As String
Select iKeyCode
Case Key.Up
sText = String(hView.ScreenWidth, "\e[D") ' move up 1 line by moving left the total chars per line.
Case Key.Down
sText = String(hView.ScreenWidth, "\e[C") ' move down 1 line by moving right the total chars per line.
Case Key.Right
sText = "\e[C"
Case Key.Left
sText = "\e[D"
End Select
sText = String(Len, sText) ' Enter code text "Len" times (default is 1)
hView.Input(sText) ' send escape sequence to the TerminalView
hView.Refresh
End