I'm writing a Unix command shell and I want it to scroll though the history when the user presses the up and down arrow keys. Obviously I can't use getchar() to intercept an escape character in canonical mode, but I know there's some other way to do it. I'm pretty sure there's some process signal that is sent to a program when its controlling terminal receives an escape character, and command shells like bash and ksh use this signal to detect when the user has pressed an arrow key. Is there such a signal?
Process signal for receiving an escape character
Started by DarkLordofthePenguins, Nov 10 2011 03:45 PM
No replies to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









