I am making a SSH client for a special device which does not have a all keys on it's keyboard, my question is how is the Esc,Alt,Ctrl and arrow keys encoded in the string sent to the shell? is it just '\033'?
I know how the Enter key behaves, it gives an ^M, from here
But when i press Ctrl+v and then Ctrl nothing appears, when i press Ctrl+v and then Ctrl+c in the teminal i get: ^C , so is Ctrl just ^ ?
But what about alt
Further more i found:
left ^[[D
right ^[[C
up ^[[A
down ^[[B
can i just write these commands as command
below, to libssh:
rc = libssh2_channel_write(self.channel, [command UTF8String], strlen([command UTF8String])))
The problem is I get the following response from ssh: zsh: substitution failed in both bash on my mac and in my SSH program:
-bash: :s^[^C: substitution failed