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: Sun, 25 Jun 2023 17:10:05 -0700 Organization: None to speak of Lines: 25 Message-ID: <87ilbb13tu.fsf@nosuchdomain.example.com> References: MIME-Version: 1.0 Content-Type: text/plain Injection-Info: dont-email.me; posting-host="a44f767d52f7a9230c899799d3560062"; logging-data="684999"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18hAIWmuvL0MAzya4jf56+E" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:GgQ60rfdVcK2GCsW8Ku/ZPzXdq4= sha1:BRe5fcbMcaUFMputxEPzZUWlQeI= Xref: csiph.com comp.lang.c++:90720 scott@slp53.sl.home (Scott Lurndal) writes: > "R.Wieser" writes: >>I've set the console input to raw so I can see keys coming in when they are >>pressed. >> >>For that I've been writing a big "switch ... case" to parse the multi-byte >>keystrokes into "records" that than can be easily worked with or discarded. >> >>As this parsing needs to be done by pretty-much every console-based program >>which wants to do any kind of interactive stuff I was wondering if this >>perhaps is already part of Linux ... >> >>If it is (and thats still a big "if"), where can I find it ? > > $ man console_ioctl I believe that only applies to the Linux system console (the text-only interface you typically get by typing Ctrl-Alt-N, where N is a small integer). I know the OP wrote "console", but I suspect they're looking for something that works on a terminal emulator. -- 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 */