Jump to content

Process signal for receiving an escape character

- - - - -

  • Please log in to reply
No replies to this topic

#1
DarkLordofthePenguins

DarkLordofthePenguins

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 409 posts
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?
Programming is a journey, not a destination.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users