I'm trying to write my own shell, and I've got it working pretty well now. But I want to add options like tab-completion, and input-buffer (i.e. so you can use the arrow characters to reuse earlier entered commands).
I found an example on how to use termios to detect a character being pressed without having to wait for the return-character, but I'm having problems with identifying the arrow-characters.
I changed my exampleprogram so that it writes out the ascii-number for the character pressed, but it identifies the arrow-characters as 65,66,67 and 68. But values are the same as A,B,C and D.
So does anyone know how this works? Or is it like some national characters that it is a combination of two characters/bytes that make up the arrow characters?