Path: csiph.com!news.swapon.de!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c++ Subject: Re: Parsing multi-byte keystrokes Date: Mon, 26 Jun 2023 14:15:48 -0700 Organization: None to speak of Lines: 36 Message-ID: <87fs6dzzzv.fsf@nosuchdomain.example.com> References: <871qhy1usn.fsf@nosuchdomain.example.com> <87wmzqyro2.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: dont-email.me; posting-host="a44f767d52f7a9230c899799d3560062"; logging-data="1145854"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/n1F4wN99E2hNAmzmVh0JZ" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:ww7wSsNCa85K/nCjCxeDcPsb6ow= sha1:bBoraW4JZTwStMtb3+8rTmRs/UA= Xref: csiph.com comp.lang.c++:90764 "R.Wieser" writes: > Keith, > >> Your newsreader should add attribution lines, like the >> "R.Wieser" writes: >> line above. Please don't delete those lines. They're there >> to show readers who wrote what. > > Thats why I have name the person I'm talking to at the top of my message - > just like yours now. Yes, I understand what you're doing and why you're doing it. I'm asking you not to do that. I'm asking you to leave the generated attribution lines in place, as everyone else here does. You're expending extra effort and making your articles more difficult to read. [...] >> So if the user presses the up-arrow key, you see three bytes: Escape, >> '[', and 'A', right? And you want to recognize that sequence as >> "up-arrow"? I'm saying that readline does exactly that internally, >> and examing the readline source code might be helpful. > > As mentioned in my initial post, I already wrote a parser. But I would like > to replace it with something build-in, which is likely to support other > $TERMs than just "linux". If a build-in method doesn't exist I will just > continue using what I currently have. If there is such an existing library, comp.lang.c++ is not the place to ask about it. Nothing you've written here is specific to C++. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */