Read raw keyboard input using read() and termios

192 views Asked by At

I'm writing a minimalistic shell for university and I stumbled on a problem: I can't read ctrl-arow_up and ctrl-arow_down on all terminals.

I tried cat -e then pressed those keys in Guake termnial - nothing happened. But when I tried the same in xterm or default ubuntu Terminal, it worked (it showed "^[[1;5A" and "^[[1;5B").

How do I make it work in all terminals? Or how do I disable shell key preprocessing?

0

There are 0 answers