Almost all the applications that I ever wrote were graphical interfaces of one form or another - HTML / Flex / Swing - and most of the applications from the command line were extremely simple, without much interaction. The most I have ever done is a simple ascii game that just does a print / input cycle, prints the playing field again and again.
I was thinking about making something more complex, and I was very curious about how some of the more advanced command line applications, such as emacs, work. In particular, I have no idea how they seem to have an interactive command line that responds to keystrokes, and apparently just works with a buffer in the terminal, and does not constantly go through the print cycle β read β. Is it all just stdin / stdout kung fu, I donβt know or is it something completely different?
Update . I want to be clear that I will not ask a wide question here, maybe itβs just hard for me to find the right words. Basically, I don't know how I will do emacs using stdin / stdout. Am I using some kind of mechanism that I donβt know about, and if so, then what?
source share