UART Arrow Key Code

Posted in 개인/ㄴFROMA by

http://www.termsys.demon.co.uk/vtansi.htm

http://electronics.stackexchange.com/questions/8874/is-it-possible-to-send-characters-through-serial-to-go-up-a-line-on-the-console


Use VT100 escape codes to control the cursor.

Eg.

puts("\033[2J");   // clear screen
puts("\033[0;0H"); // set cursor to 0,0
puts("\033[10B");  // move cursor down 10 lines
puts("\033[5A");  // move cursor up 5 lines