Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

19 May, 2024: Line wrapping has been changed to be more consistent with Usenet standards.
 If you find that it is broken please let me know here rocksolid.nodes.help


devel / comp.lang.c++ / Parsing multi-byte keystrokes

SubjectAuthor
* Parsing multi-byte keystrokesR.Wieser
+* Re: Parsing multi-byte keystrokesAlf P. Steinbach
|+- Re: Parsing multi-byte keystrokesR.Wieser
|`* Re: Parsing multi-byte keystrokesKeith Thompson
| +* Re: Parsing multi-byte keystrokesPavel
| |`- Re: Parsing multi-byte keystrokesKeith Thompson
| `- Re: Parsing multi-byte keystrokesR.Wieser
+* Re: Parsing multi-byte keystrokesPavel
|+* Re: Parsing multi-byte keystrokesBen Bacarisse
||`* Re: Parsing multi-byte keystrokesR.Wieser
|| +- Re: Parsing multi-byte keystrokesChristian Gollwitzer
|| `* Re: Parsing multi-byte keystrokesBen Bacarisse
||  `* Re: Parsing multi-byte keystrokesR.Wieser
||   `* Re: Parsing multi-byte keystrokesChristian Gollwitzer
||    `* Re: Parsing multi-byte keystrokesR.Wieser
||     +- Re: Parsing multi-byte keystrokesKeith Thompson
||     `* Re: Parsing multi-byte keystrokesChristian Gollwitzer
||      `- Re: Parsing multi-byte keystrokesKeith Thompson
|`* Re: Parsing multi-byte keystrokesR.Wieser
| +* Re: Parsing multi-byte keystrokesKeith Thompson
| |`* Re: Parsing multi-byte keystrokesR.Wieser
| | +* Re: Parsing multi-byte keystrokesMuttley
| | |`- Re: Parsing multi-byte keystrokesR.Wieser
| | `* Re: Parsing multi-byte keystrokesKeith Thompson
| |  `* Re: Parsing multi-byte keystrokesR.Wieser
| |   +- Re: Parsing multi-byte keystrokesKeith Thompson
| |   `* Re: Parsing multi-byte keystrokesScott Lurndal
| |    `- Re: Parsing multi-byte keystrokesR.Wieser
| +* Re: Parsing multi-byte keystrokesScott Lurndal
| |+- Re: Parsing multi-byte keystrokesR.Wieser
| |`- Re: Parsing multi-byte keystrokesKeith Thompson
| +* Re: Parsing multi-byte keystrokesred floyd
| |`* Re: Parsing multi-byte keystrokesKenny McCormack
| | `* Re: Parsing multi-byte keystrokesScott Lurndal
| |  `* Re: Parsing multi-byte keystrokesR.Wieser
| |   `* Re: Parsing multi-byte keystrokesKenny McCormack
| |    `* Re: Parsing multi-byte keystrokesR.Wieser
| |     +* Re: Parsing multi-byte keystrokesBen Bacarisse
| |     |`* Re: Parsing multi-byte keystrokesR.Wieser
| |     | +* Re: Parsing multi-byte keystrokesScott Lurndal
| |     | |`- Re: Parsing multi-byte keystrokesR.Wieser
| |     | +* Re: Parsing multi-byte keystrokesPaavo Helde
| |     | |`- Re: Parsing multi-byte keystrokesR.Wieser
| |     | +- Re: Parsing multi-byte keystrokesBen Bacarisse
| |     | +* Re: Parsing multi-byte keystrokesKeith Thompson
| |     | |`* Re: Parsing multi-byte keystrokesR.Wieser
| |     | | `* Re: Parsing multi-byte keystrokesKeith Thompson
| |     | |  `* Re: Parsing multi-byte keystrokesR.Wieser
| |     | |   +* Re: Parsing multi-byte keystrokesChristian Gollwitzer
| |     | |   |`- Re: Parsing multi-byte keystrokesR.Wieser
| |     | |   +* Re: Parsing multi-byte keystrokesKeith Thompson
| |     | |   |`* Re: Parsing multi-byte keystrokesR.Wieser
| |     | |   | +- Re: Parsing multi-byte keystrokesScott Lurndal
| |     | |   | `- Re: Parsing multi-byte keystrokesJames Kuyper
| |     | |   `* Re: Parsing multi-byte keystrokesMuttley
| |     | |    `* Re: Parsing multi-byte keystrokesR.Wieser
| |     | |     +- Re: Parsing multi-byte keystrokesKenny McCormack
| |     | |     +* Re: Parsing multi-byte keystrokesJames Kuyper
| |     | |     |`* Re: Parsing multi-byte keystrokesScott Lurndal
| |     | |     | `* Re: Parsing multi-byte keystrokesJames Kuyper
| |     | |     |  `* Re: Parsing multi-byte keystrokesKalevi Kolttonen
| |     | |     |   +* Re: Parsing multi-byte keystrokesKeith Thompson
| |     | |     |   |`* Re: Parsing multi-byte keystrokesKalevi Kolttonen
| |     | |     |   | `- Re: Parsing multi-byte keystrokesScott Lurndal
| |     | |     |   `- Re: Parsing multi-byte keystrokesScott Lurndal
| |     | |     `* Re: Parsing multi-byte keystrokesMuttley
| |     | |      +* Re: Parsing multi-byte keystrokesDavid Brown
| |     | |      |+* Re: Parsing multi-byte keystrokesKalevi Kolttonen
| |     | |      ||+* Re: Parsing multi-byte keystrokesKenny McCormack
| |     | |      |||`- Re: Parsing multi-byte keystrokesKalevi Kolttonen
| |     | |      ||`* Re: Parsing multi-byte keystrokesDavid Brown
| |     | |      || +- Re: Parsing multi-byte keystrokesScott Lurndal
| |     | |      || +* Re: Parsing multi-byte keystrokesChris M. Thomasson
| |     | |      || |`- Re: Parsing multi-byte keystrokesScott Lurndal
| |     | |      || `- Re: Parsing multi-byte keystrokesKalevi Kolttonen
| |     | |      |`- Re: Parsing multi-byte keystrokesMuttley
| |     | |      `* Re: Parsing multi-byte keystrokesred floyd
| |     | |       +- Cars (Was: Parsing what is Linux?)Kenny McCormack
| |     | |       `* Re: Parsing multi-byte keystrokesMuttley
| |     | |        `* Cars (Was: Parsing multi-byte keystrokes)Kenny McCormack
| |     | |         `* Re: Cars (Was: Parsing multi-byte keystrokes)Muttley
| |     | |          `* Totally insane (Was: Cars (Was: Parsing multi-byte keystrokes))Kenny McCormack
| |     | |           `- Re: Totally insane (Was: Cars (Was: Parsing multi-byte keystrokes))Muttley
| |     | `* Re: Parsing multi-byte keystrokesJames Kuyper
| |     |  +- Re: Parsing multi-byte keystrokesKenny McCormack
| |     |  +* Re: Parsing multi-byte keystrokesR.Wieser
| |     |  |+* Re: Parsing multi-byte keystrokesJames Kuyper
| |     |  ||`* Re: Parsing multi-byte keystrokesR.Wieser
| |     |  || `* Re: Parsing multi-byte keystrokesJames Kuyper
| |     |  ||  `* Re: Parsing multi-byte keystrokesR.Wieser
| |     |  ||   `* Re: Parsing multi-byte keystrokesJames Kuyper
| |     |  ||    `* Re: Parsing multi-byte keystrokesR.Wieser
| |     |  ||     +- Re: Parsing multi-byte keystrokesScott Lurndal
| |     |  ||     `* Re: Parsing multi-byte keystrokesJames Kuyper
| |     |  ||      +* Re: Parsing multi-byte keystrokesRichard Harnden
| |     |  ||      |`- Re: Parsing multi-byte keystrokesKeith Thompson
| |     |  ||      +* Re: Parsing multi-byte keystrokesR.Wieser
| |     |  ||      |`- Re: Parsing multi-byte keystrokesJames Kuyper
| |     |  ||      `- Re: Parsing multi-byte keystrokesKeith Thompson
| |     |  |`* Re: Parsing multi-byte keystrokesDavid Brown
| |     |  | `* Re: Parsing multi-byte keystrokesR.Wieser
| |     |  `* Re: Parsing multi-byte keystrokesMalcolm McLean
| |     `* Re: Parsing multi-byte keystrokesAlf P. Steinbach
| `* Re: Parsing multi-byte keystrokesPavel
+* Re: Parsing multi-byte keystrokesScott Lurndal
`* Re: Parsing multi-byte keystrokeswij

Pages:123456
Parsing multi-byte keystrokes

<u79ug0$i1ks$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=471&group=comp.lang.c%2B%2B#471

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: addr...@is.invalid (R.Wieser)
Newsgroups: comp.lang.c++
Subject: Parsing multi-byte keystrokes
Date: Sun, 25 Jun 2023 19:45:27 +0200
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <u79ug0$i1ks$1@dont-email.me>
Injection-Date: Sun, 25 Jun 2023 17:45:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b4a06876ee58fb7e64bd98c4d876f809";
logging-data="591516"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18u/WHHumwQQnOcc9To7f2wTWCvo1dwO88M/uZ5+6sdpg=="
Cancel-Lock: sha1:VkRYftP+uN62I/iKMnnYAmJaC4M=
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-Priority: 3
X-MSMail-Priority: Normal
 by: R.Wieser - Sun, 25 Jun 2023 17:45 UTC

Hello all,

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 ?

Second question : How do I check for modifier keys (like alt, shift, ctrl)
on the pressed keys or seperatily ? I would like to be able to, as an
example, catch a ctrl-cursor-left as well as a normal or a shift-curor-left.

Regards,
Rudy Wieser

Re: Parsing multi-byte keystrokes

<u7a1bg$ids6$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=472&group=comp.lang.c%2B%2B#472

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: alf.p.st...@gmail.com (Alf P. Steinbach)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Sun, 25 Jun 2023 20:34:24 +0200
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <u7a1bg$ids6$1@dont-email.me>
References: <u79ug0$i1ks$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 25 Jun 2023 18:34:24 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="66e5e5f1d81651295f74bcd20d782815";
logging-data="604038"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+0OJ6mLz8+txlpimkbOAE"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:c68WIF9KB7aWkq5YrAw+70LxnKA=
In-Reply-To: <u79ug0$i1ks$1@dont-email.me>
Content-Language: en-US
 by: Alf P. Steinbach - Sun, 25 Jun 2023 18:34 UTC

On 2023-06-25 7:45 PM, R.Wieser wrote:
> Hello all,
>
> 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 ?

curses library

> Second question : How do I check for modifier keys (like alt, shift, ctrl)
> on the pressed keys or seperatily ? I would like to be able to, as an
> example, catch a ctrl-cursor-left as well as a normal or a shift-curor-left.

Re: Parsing multi-byte keystrokes

<u7a569$iueq$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=473&group=comp.lang.c%2B%2B#473

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: addr...@is.invalid (R.Wieser)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Sun, 25 Jun 2023 21:39:43 +0200
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <u7a569$iueq$1@dont-email.me>
References: <u79ug0$i1ks$1@dont-email.me> <u7a1bg$ids6$1@dont-email.me>
Injection-Date: Sun, 25 Jun 2023 19:39:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b4a06876ee58fb7e64bd98c4d876f809";
logging-data="621018"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19cDOz2N+rPR9inmdsxw/sh5q/CeKXJL0DptlxnNfxXjA=="
Cancel-Lock: sha1:5ZXp8eyyenKHIOAvcoZG/+oapgU=
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MSMail-Priority: Normal
X-RFC2646: Format=Flowed; Response
 by: R.Wieser - Sun, 25 Jun 2023 19:39 UTC

Alf,

>> If it is (and thats still a big "if"), where can I find it ?
>
> curses library

Thats was the first thing I checked for, but it does not seem to be part of
my "bullseye lite" installation ...

But assuming I go and install it, its "man" page shows that it has got quite
a number of functions. Any suggestions to where to look how to use it for
what I described ?

Regards,
Rudy Wieser

Re: Parsing multi-byte keystrokes

<87mt0n19ju.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=474&group=comp.lang.c%2B%2B#474

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Sun, 25 Jun 2023 15:06:29 -0700
Organization: None to speak of
Lines: 39
Message-ID: <87mt0n19ju.fsf@nosuchdomain.example.com>
References: <u79ug0$i1ks$1@dont-email.me> <u7a1bg$ids6$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="a44f767d52f7a9230c899799d3560062";
logging-data="650754"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+p3AJJsgTNP6f6AOVrNHCV"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:9R81w29TbqW/PDICpvG4jgsHtHY=
sha1:P299eJN2jNQMfSNlEpvFg4fNEF0=
 by: Keith Thompson - Sun, 25 Jun 2023 22:06 UTC

"Alf P. Steinbach" <alf.p.steinbach@gmail.com> writes:
> On 2023-06-25 7:45 PM, R.Wieser wrote:
>> Hello all,
>>
>> 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 ?
>
> curses library

curses takes over the entire (text / terminal) screen, keeping track
of what character is shown at each location and using minimal output to
update it as needed.

If that's what you want, that's great, but as far as I can tell curses
is not suitable for, for example, detecting the user pressing an arrow
key *without* controlling the whole screen.

The GNU readline library may be closer, but it's at a higher level; it
handles things like arrow key input, but it doesn't give you information
like "the user just pressed up-arrow". In the past, I've tried and
failed to find a library that gives access to that kind of information.
(The terminfo database gives you the character sequences corresponding
to the various keys, but I don't think it provides code to detect them
on input.)

--
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 */

Re: Parsing multi-byte keystrokes

<Xm3mM.7635$3XE8.5950@fx42.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=475&group=comp.lang.c%2B%2B#475

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx42.iad.POSTED!not-for-mail
Subject: Re: Parsing multi-byte keystrokes
Newsgroups: comp.lang.c++
References: <u79ug0$i1ks$1@dont-email.me>
From: pauldont...@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.15
MIME-Version: 1.0
In-Reply-To: <u79ug0$i1ks$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 34
Message-ID: <Xm3mM.7635$3XE8.5950@fx42.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Sun, 25 Jun 2023 22:39:51 UTC
Date: Sun, 25 Jun 2023 18:39:51 -0400
X-Received-Bytes: 1718
 by: Pavel - Sun, 25 Jun 2023 22:39 UTC

R.Wieser wrote:
> Hello all,
>
> 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 ?

On Linux (strictly speaking, on a GNU system) specifically, try readline
function.

AFAIK, it is available everywhere bash is so your system should already
have it. Try "man readline".

>
> Second question : How do I check for modifier keys (like alt, shift, ctrl)
> on the pressed keys or seperatily ? I would like to be able to, as an
> example, catch a ctrl-cursor-left as well as a normal or a shift-curor-left.
>
> Regards,
> Rudy Wieser
>
>

HTH
-Pavel

Re: Parsing multi-byte keystrokes

<lZ3mM.83590$8uge.57668@fx14.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=476&group=comp.lang.c%2B%2B#476

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx14.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Parsing multi-byte keystrokes
Newsgroups: comp.lang.c++
References: <u79ug0$i1ks$1@dont-email.me>
Lines: 17
Message-ID: <lZ3mM.83590$8uge.57668@fx14.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Sun, 25 Jun 2023 23:20:49 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Sun, 25 Jun 2023 23:20:49 GMT
X-Received-Bytes: 1154
 by: Scott Lurndal - Sun, 25 Jun 2023 23:20 UTC

"R.Wieser" <address@is.invalid> writes:
>Hello all,
>
>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

Re: Parsing multi-byte keystrokes

<87edlz5cax.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=477&group=comp.lang.c%2B%2B#477

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Mon, 26 Jun 2023 00:53:26 +0100
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <87edlz5cax.fsf@bsb.me.uk>
References: <u79ug0$i1ks$1@dont-email.me> <Xm3mM.7635$3XE8.5950@fx42.iad>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="30bd7937b87860f973277a7390f3a6b0";
logging-data="678069"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yC8yRs/ghU5r3HVQD0iN8vg8TR080hZA="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:nl2FJ3PSh9iJ+PN1eqlwveWZr+o=
sha1:LPMqEp8QR/NSKFt3zwwfJXJbSFs=
X-BSB-Auth: 1.dc4e4a94eca106a164fc.20230626005326BST.87edlz5cax.fsf@bsb.me.uk
 by: Ben Bacarisse - Sun, 25 Jun 2023 23:53 UTC

Pavel <pauldontspamtolk@removeyourself.dontspam.yahoo> writes:

> R.Wieser wrote:
>> Hello all,
>> 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 ?
>
> On Linux (strictly speaking, on a GNU system) specifically, try readline
> function.
>
> AFAIK, it is available everywhere bash is so your system should already
> have it. Try "man readline".

I don't know if it's what's wanted but the rlwrap program is not as well
know as it should be. Essentially it "wraps" any interactive program
with a readline-driven editing, completion and history interface.

--
Ben.

Re: Parsing multi-byte keystrokes

<87ilbb13tu.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=478&group=comp.lang.c%2B%2B#478

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (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: <u79ug0$i1ks$1@dont-email.me> <lZ3mM.83590$8uge.57668@fx14.iad>
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=
 by: Keith Thompson - Mon, 26 Jun 2023 00:10 UTC

scott@slp53.sl.home (Scott Lurndal) writes:
> "R.Wieser" <address@is.invalid> 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 */

Re: Parsing multi-byte keystrokes

<kP4mM.83591$8uge.70991@fx14.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=479&group=comp.lang.c%2B%2B#479

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx14.iad.POSTED!not-for-mail
Subject: Re: Parsing multi-byte keystrokes
Newsgroups: comp.lang.c++
References: <u79ug0$i1ks$1@dont-email.me> <u7a1bg$ids6$1@dont-email.me>
<87mt0n19ju.fsf@nosuchdomain.example.com>
From: pauldont...@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.15
MIME-Version: 1.0
In-Reply-To: <87mt0n19ju.fsf@nosuchdomain.example.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 68
Message-ID: <kP4mM.83591$8uge.70991@fx14.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Mon, 26 Jun 2023 00:18:24 UTC
Date: Sun, 25 Jun 2023 20:18:13 -0400
X-Received-Bytes: 2974
 by: Pavel - Mon, 26 Jun 2023 00:18 UTC

Keith Thompson wrote:
> "Alf P. Steinbach" <alf.p.steinbach@gmail.com> writes:
>> On 2023-06-25 7:45 PM, R.Wieser wrote:
>>> Hello all,
>>>
>>> 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 ?
>>
>> curses library
>
> curses takes over the entire (text / terminal) screen, keeping track
> of what character is shown at each location and using minimal output to
> update it as needed.
>
> If that's what you want, that's great, but as far as I can tell curses
> is not suitable for, for example, detecting the user pressing an arrow
> key *without* controlling the whole screen.
>
> The GNU readline library may be closer, but it's at a higher level; it
> handles things like arrow key input, but it doesn't give you information
> like "the user just pressed up-arrow". In the past, I've tried and
> failed to find a library that gives access to that kind of information.

These codes are terminal-specific but basic things like up-arrww are
more or less standardized in ANSI terminal.

Unsure if this is what you were looking for, but works for me:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <readline/readline.h>

int
up_callback(int count, int key) {
printf ("the user just pressed up-arrow\n");
return 0;
}

int
main(int argc, char *argv[])
{ rl_bind_keyseq ("\\e[A", up_callback);
free(readline("press a button > "));

printf("\n");

return 0;
}

> (The terminfo database gives you the character sequences corresponding
> to the various keys, but I don't think it provides code to detect them
> on input.)
>

HTH
-Pavel

Re: Parsing multi-byte keystrokes

<87bkh30y8r.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=480&group=comp.lang.c%2B%2B#480

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Sun, 25 Jun 2023 19:10:44 -0700
Organization: None to speak of
Lines: 46
Message-ID: <87bkh30y8r.fsf@nosuchdomain.example.com>
References: <u79ug0$i1ks$1@dont-email.me> <u7a1bg$ids6$1@dont-email.me>
<87mt0n19ju.fsf@nosuchdomain.example.com>
<kP4mM.83591$8uge.70991@fx14.iad>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="a44f767d52f7a9230c899799d3560062";
logging-data="829018"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Kg6m967LZ3VBUMhVwdA84"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:yO7U1RtkffaGrQCkGHVBikiNN9w=
sha1:GrGrWzw2xUodWVlmlZMdOLlCWxU=
 by: Keith Thompson - Mon, 26 Jun 2023 02:10 UTC

Pavel <pauldontspamtolk@removeyourself.dontspam.yahoo> writes:
> Keith Thompson wrote:
>> "Alf P. Steinbach" <alf.p.steinbach@gmail.com> writes:
>>> On 2023-06-25 7:45 PM, R.Wieser wrote:
>>>> Hello all,
>>>>
>>>> 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 ?
>>>
>>> curses library
>> curses takes over the entire (text / terminal) screen, keeping track
>> of what character is shown at each location and using minimal output to
>> update it as needed.
>> If that's what you want, that's great, but as far as I can tell
>> curses
>> is not suitable for, for example, detecting the user pressing an arrow
>> key *without* controlling the whole screen.
>> The GNU readline library may be closer, but it's at a higher level;
>> it
>> handles things like arrow key input, but it doesn't give you information
>> like "the user just pressed up-arrow". In the past, I've tried and
>> failed to find a library that gives access to that kind of information.
>
> These codes are terminal-specific but basic things like up-arrww are
> more or less standardized in ANSI terminal.

These days, yes, mostly. Termcap, terminfo, and [n]curses were
developed when there were a wide variety of terminals (not just
emulators) with incompatible control sequences. Today if you assume
VT100-compatible codes, you can probably get away with it. But there
are still a lot of libraries that support other terminal types.

--
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 */

Re: Parsing multi-byte keystrokes

<u7bee0$sht9$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=481&group=comp.lang.c%2B%2B#481

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: addr...@is.invalid (R.Wieser)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Mon, 26 Jun 2023 08:46:11 +0200
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <u7bee0$sht9$1@dont-email.me>
References: <u79ug0$i1ks$1@dont-email.me> <u7a1bg$ids6$1@dont-email.me> <87mt0n19ju.fsf@nosuchdomain.example.com>
Injection-Date: Mon, 26 Jun 2023 07:23:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3e13d070687dc98f7060108e206c1d81";
logging-data="935849"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ZeREFWyzCg2G8A+NBqQmxLOPy07C+DTuhHIzQIcBd+g=="
Cancel-Lock: sha1:RsnfeG7bPfGQbnBo7Vvg+HJFWvA=
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-MSMail-Priority: Normal
X-Priority: 3
 by: R.Wieser - Mon, 26 Jun 2023 06:46 UTC

Keith,

> curses takes over the entire (text / terminal) screen
....
> but as far as I can tell curses is not suitable for, for example,
> detecting the user pressing an arrow key *without* controlling
> the whole screen.

That indeed makes it pretty-much unusable for me.

> In the past, I've tried and failed to find a library that gives access
> to that kind of information.

IOW, it probably doesn't exist and I need to create my own solution for it.
You telling me that saves me a /lot/ of further googeling. Thanks.

> (The terminfo database gives you the character sequences corresponding
> to the various keys, but I don't think it provides code to detect them
> on input.)

Its something to look at and see if it can be used to do the reverse.

Thanks for the info and heads-up.

Regards,
Rudy Wieser

Re: Parsing multi-byte keystrokes

<u7bee1$sht9$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=482&group=comp.lang.c%2B%2B#482

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: addr...@is.invalid (R.Wieser)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Mon, 26 Jun 2023 08:50:45 +0200
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <u7bee1$sht9$2@dont-email.me>
References: <u79ug0$i1ks$1@dont-email.me> <Xm3mM.7635$3XE8.5950@fx42.iad>
Injection-Date: Mon, 26 Jun 2023 07:23:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3e13d070687dc98f7060108e206c1d81";
logging-data="935849"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18NPDREivszOB6347cbljRDz8D/fBCv5vuq9gbYcZ6bNA=="
Cancel-Lock: sha1:rLlTsurpGtRug5C4a0rwi4Gc/Gs=
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
X-MSMail-Priority: Normal
 by: R.Wieser - Mon, 26 Jun 2023 06:50 UTC

Pavel,

> On Linux (strictly speaking, on a GNU system) specifically, try readline
> function.

The problem with that is that I need the keys at the moment they are pressed
(and released ?), not only after "enter" is pressed.

Regards,
Rudy Wieser

Re: Parsing multi-byte keystrokes

<u7bee1$sht9$3@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=483&group=comp.lang.c%2B%2B#483

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: addr...@is.invalid (R.Wieser)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Mon, 26 Jun 2023 08:56:34 +0200
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <u7bee1$sht9$3@dont-email.me>
References: <u79ug0$i1ks$1@dont-email.me> <lZ3mM.83590$8uge.57668@fx14.iad>
Injection-Date: Mon, 26 Jun 2023 07:23:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3e13d070687dc98f7060108e206c1d81";
logging-data="935849"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+o2w8RlBWXk2RFZ5095CfVi4TKPQaGnXto358JCsvHWg=="
Cancel-Lock: sha1:alF3zxsyUW9BfnM47LL8u7qadG8=
X-MSMail-Priority: Normal
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Original
 by: R.Wieser - Mon, 26 Jun 2023 06:56 UTC

Scott,

> $ man console_ioctl

Yeah, I found that one too.

Correct me if I'm wrong, but that looks like it only works for the local
keyboard and won't be of much use in a remote session ...

Regards,
Rudy Wieser

Re: Parsing multi-byte keystrokes

<u7bee2$sht9$4@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=484&group=comp.lang.c%2B%2B#484

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: addr...@is.invalid (R.Wieser)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Mon, 26 Jun 2023 09:11:24 +0200
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <u7bee2$sht9$4@dont-email.me>
References: <u79ug0$i1ks$1@dont-email.me> <Xm3mM.7635$3XE8.5950@fx42.iad> <87edlz5cax.fsf@bsb.me.uk>
Injection-Date: Mon, 26 Jun 2023 07:23:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3e13d070687dc98f7060108e206c1d81";
logging-data="935849"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+NjZuxeCKPz3UxOq9wxn8mQul8Tv9xXeJdTay+2yweDw=="
Cancel-Lock: sha1:Rsw+hIgPCYgOvm/D5olvxspOY2U=
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
X-MSMail-Priority: Normal
 by: R.Wieser - Mon, 26 Jun 2023 07:11 UTC

Ben,

> Essentially it "wraps" any interactive program with a
> readline-driven editing, completion and history interface.

Thats pretty-much the opposite of what I currently want/need.

I'm trying to write something thats interactive - For example, imagine a
list of items you can move thru using the cursor keys and select pressing
the spacebar.

Regards,
Rudy Wieser

Re: Parsing multi-byte keystrokes

<u7bee2$sht9$5@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=485&group=comp.lang.c%2B%2B#485

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: addr...@is.invalid (R.Wieser)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Mon, 26 Jun 2023 09:21:45 +0200
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <u7bee2$sht9$5@dont-email.me>
References: <u79ug0$i1ks$1@dont-email.me> <lZ3mM.83590$8uge.57668@fx14.iad> <87ilbb13tu.fsf@nosuchdomain.example.com>
Injection-Date: Mon, 26 Jun 2023 07:23:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3e13d070687dc98f7060108e206c1d81";
logging-data="935849"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xrLZAEu1Dvm1LQLFEf4HqDXgwNeNEXX58dCbBatJjDA=="
Cancel-Lock: sha1:VS3cq7GkfrBhA9e2gCSKpQ7akDY=
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-Priority: 3
X-MSMail-Priority: Normal
 by: R.Wieser - Mon, 26 Jun 2023 07:21 UTC

Keith,

> I know the OP wrote "console", but I suspect they're looking
> for something that works on a terminal emulator.

Nope, not an emulator. As said, "bullseye lite" doesn't have a GUI.

As for the difference between a "console" and a "terminal" ? I must say
that its not quite clear (read: confusing) to me , as it seems to be used
interchangably. If you have a good description about the differences
between a "console" and a "terminal" than I would like to hear about it.

Simply said, to me a "console" is the text-based interface you get on a
'puter thats executing the commands. A "terminal" is the program you use
to remotely(?) connect to such a console.

Regards,
Rudy Wieser

Re: Parsing multi-byte keystrokes

<u7bev4$si0u$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=486&group=comp.lang.c%2B%2B#486

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aurio...@gmx.de (Christian Gollwitzer)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Mon, 26 Jun 2023 09:32:52 +0200
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <u7bev4$si0u$1@dont-email.me>
References: <u79ug0$i1ks$1@dont-email.me> <Xm3mM.7635$3XE8.5950@fx42.iad>
<87edlz5cax.fsf@bsb.me.uk> <u7bee2$sht9$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 26 Jun 2023 07:32:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="97c8d488b537bebb57da30d6a7f12760";
logging-data="935966"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ph4Nne2Vd8UB07PAftiL7gIY555tDQck="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.12.0
Cancel-Lock: sha1:eulqrmlmwnF27UMniIlaaoh/rQk=
In-Reply-To: <u7bee2$sht9$4@dont-email.me>
 by: Christian Gollwitzer - Mon, 26 Jun 2023 07:32 UTC

Hi Rudy,

Am 26.06.23 um 09:11 schrieb R.Wieser: >> Essentially it "wraps" any
interactive program with a
>> readline-driven editing, completion and history interface.
>
> Thats pretty-much the opposite of what I currently want/need.
>
> I'm trying to write something thats interactive - For example, imagine a
> list of items you can move thru using the cursor keys and select pressing
> the spacebar.

Then you might want something even more higher level than curses. For
example, CDK gives you widgets in order to program a GUI that runs in
the terminal: https://github.com/lnkgyv/cdk_examples

If you are actually looking to do it on your own, you might want to look
at termcap, which tells you the raw codes involved:
https://www.gnu.org/software/termutils/manual/termcap-1.3/html_node/termcap_37.html

Christian

Re: Parsing multi-byte keystrokes

<877crq1va9.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=487&group=comp.lang.c%2B%2B#487

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Mon, 26 Jun 2023 01:29:18 -0700
Organization: None to speak of
Lines: 28
Message-ID: <877crq1va9.fsf@nosuchdomain.example.com>
References: <u79ug0$i1ks$1@dont-email.me> <lZ3mM.83590$8uge.57668@fx14.iad>
<87ilbb13tu.fsf@nosuchdomain.example.com>
<u7bee2$sht9$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="a44f767d52f7a9230c899799d3560062";
logging-data="949624"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Epw+DdvzhZgZzPwGG1R/D"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:ZiVruFteJUDb3jrcerZHGJJ+klw=
sha1:ph/hBsSTw/w+9nANP0eJLJVvclQ=
 by: Keith Thompson - Mon, 26 Jun 2023 08:29 UTC

"R.Wieser" <address@is.invalid> writes:
> Keith,
>
>> I know the OP wrote "console", but I suspect they're looking
>> for something that works on a terminal emulator.
>
> Nope, not an emulator. As said, "bullseye lite" doesn't have a GUI.
>
> As for the difference between a "console" and a "terminal" ? I must say
> that its not quite clear (read: confusing) to me , as it seems to be used
> interchangably. If you have a good description about the differences
> between a "console" and a "terminal" than I would like to hear about it.
>
> Simply said, to me a "console" is the text-based interface you get on a
> 'puter thats executing the commands. A "terminal" is the program you use
> to remotely(?) connect to such a console.

The term "console", on Unix-like systems, typically refers to the system
console, sometimes accessed via /dev/console, while a "terminal" is a
more general term for a text-based interface, usually accessed via
/dev/tty* or similar. (A typical user might never see the console.)

The details beyond that are probably off-topic here.

--
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 */

Re: Parsing multi-byte keystrokes

<875y7a1v7t.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=488&group=comp.lang.c%2B%2B#488

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Mon, 26 Jun 2023 01:30:46 -0700
Organization: None to speak of
Lines: 33
Message-ID: <875y7a1v7t.fsf@nosuchdomain.example.com>
References: <u79ug0$i1ks$1@dont-email.me> <lZ3mM.83590$8uge.57668@fx14.iad>
<87ilbb13tu.fsf@nosuchdomain.example.com>
<u7bee2$sht9$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="a44f767d52f7a9230c899799d3560062";
logging-data="949624"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+M7xWcSkn50gRfeDBTCpzK"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:ETHHXYRlILSc2nRRsG4CsrvwGcM=
sha1:osBD5dPePn1cYm+vn3HeQ+g11s0=
 by: Keith Thompson - Mon, 26 Jun 2023 08:30 UTC

"R.Wieser" <address@is.invalid> writes:
> Keith,
>
>> I know the OP wrote "console", but I suspect they're looking
>> for something that works on a terminal emulator.
>
> Nope, not an emulator. As said, "bullseye lite" doesn't have a GUI.
>
> As for the difference between a "console" and a "terminal" ? I must say
> that its not quite clear (read: confusing) to me , as it seems to be used
> interchangably. If you have a good description about the differences
> between a "console" and a "terminal" than I would like to hear about it.
>
> Simply said, to me a "console" is the text-based interface you get on a
> 'puter thats executing the commands. A "terminal" is the program you use
> to remotely(?) connect to such a console.

The term "console", on Unix-like systems, typically refers to the system
console, sometimes accessed via /dev/console, while a "terminal" is a
more general term for a text-based interface, usually accessed via
/dev/tty* or similar. (A typical user might never see the console.)

Historically, you'd have a single system console (hardware terminal)
connected directly to the computer, and one or more remote terminals for
users. More modern interfaces (virtual consoles and terminal emulators)
are based on that.

The details beyond that are probably off-topic here, if they aren't already.

--
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 */

Re: Parsing multi-byte keystrokes

<871qhy1usn.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=489&group=comp.lang.c%2B%2B#489

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Mon, 26 Jun 2023 01:39:52 -0700
Organization: None to speak of
Lines: 16
Message-ID: <871qhy1usn.fsf@nosuchdomain.example.com>
References: <u79ug0$i1ks$1@dont-email.me> <Xm3mM.7635$3XE8.5950@fx42.iad>
<u7bee1$sht9$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="a44f767d52f7a9230c899799d3560062";
logging-data="949624"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18jK9WKCXxFeUw4Dw66V8tu"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:XOijvVmQVlg8i/Ou1qvUws9hIiU=
sha1:4rjdpAym6dcmC8ElD1PIS//MB70=
 by: Keith Thompson - Mon, 26 Jun 2023 08:39 UTC

"R.Wieser" <address@is.invalid> writes:
>> On Linux (strictly speaking, on a GNU system) specifically, try readline
>> function.
>
> The problem with that is that I need the keys at the moment they are pressed
> (and released ?), not only after "enter" is pressed.

You might take a look at the readline source code to see how it does
that. It's certainly able to recognize the user pressing up-arrow
(which typically sends Esc-[-A) and acting on it immediately,
even if it doesn't expose that ability directly to the user.

--
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 */

Re: Parsing multi-byte keystrokes

<e992ebdc-2d53-4134-9cfd-fd9339c8ffe5n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=490&group=comp.lang.c%2B%2B#490

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:ad4:4e67:0:b0:635:e175:6dd with SMTP id ec7-20020ad44e67000000b00635e17506ddmr105954qvb.7.1687770399495;
Mon, 26 Jun 2023 02:06:39 -0700 (PDT)
X-Received: by 2002:a37:5886:0:b0:763:a2ec:27e7 with SMTP id
m128-20020a375886000000b00763a2ec27e7mr2140964qkb.7.1687770399291; Mon, 26
Jun 2023 02:06:39 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!newsfeed.hasname.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c++
Date: Mon, 26 Jun 2023 02:06:39 -0700 (PDT)
In-Reply-To: <u79ug0$i1ks$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=124.218.76.41; posting-account=0Ek0TQoAAAAS0oceh95IuNV59QuIWNeN
NNTP-Posting-Host: 124.218.76.41
References: <u79ug0$i1ks$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e992ebdc-2d53-4134-9cfd-fd9339c8ffe5n@googlegroups.com>
Subject: Re: Parsing multi-byte keystrokes
From: wynii...@gmail.com (wij)
Injection-Date: Mon, 26 Jun 2023 09:06:39 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5344
 by: wij - Mon, 26 Jun 2023 09:06 UTC

On Monday, June 26, 2023 at 1:45:54 AM UTC+8, R.Wieser wrote:
> Hello all,
>
> 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 ?
>
> Second question : How do I check for modifier keys (like alt, shift, ctrl)
> on the pressed keys or seperatily ? I would like to be able to, as an
> example, catch a ctrl-cursor-left as well as a normal or a shift-curor-left.
>
> Regards,
> Rudy Wieser

/* Copyright is licensed by GNU LGPL, see file COPYING. by I.J.Wang 2005

Raw mode TTY for keyboard input.

Build: g++ t_kb.cpp -lwy
*/
#include <Wy.stdio.h> // for cin,cout,cerr
#include <Wy.termios.h>
#include <Wy.unistd.h>

using namespace Wy;

// TTY i/o (raw mode terminal)
// RawTerm changes tty attributes so that we can read key stroke without press ENTER
//
// Warning: Many virtual members of ChrFile are not reimplemented for simplicity.
//
class RawTerm : public ChrFile {
Termios m_ptio; // Previous(original) termios setting
public:
WY_DECL_REPLY;
RawTerm() {};
RawTerm(const char*, int);
~RawTerm();
Errno getch(char&);
Errno write(const char);
Errno write(const char*);
} static mtty("/dev/tty",O_RDWR);

RawTerm::RawTerm(const char* pathname, int flag)
: ChrFile(pathname,flag)
{ Errno r=tcflush(*this,TCIFLUSH);
if(r!=Ok) {
WY_THROW( Reply(r) );
}
if((r=tcgetattr(*this,m_ptio))!=Ok) {
WY_THROW( Reply(r) );
}
try {
// Set the terminal mode
//
Termios ntio(m_ptio);
ntio.iflag_and(~(BRKINT| ICRNL| IXON| INPCK | ISTRIP));
ntio.lflag_and(~(ICANON| ECHO| ISIG| TOSTOP| IEXTEN));
ntio.oflag_and( ~(OPOST) );
ntio.cflag_or( CS8 );
ntio.cc_VMIN(1);
ntio.cc_VTIME(0);
if((r=tcsetattr(*this,TCSANOW,ntio))!=Ok) {
WY_THROW( Reply(r) );
}

// Read back check
Termios tmptio;
if((r=tcgetattr(*this,tmptio))!=Ok) {
WY_THROW( Reply(r) );
}

// Omitted: Check termios setting accepted or not
}
catch(const Termios::Reply& e) {
WY_THROW( Reply(r) );
};
};

RawTerm::~RawTerm()
{ // If *this is default, these functions just fail (no effect for any device)
Errno r;
r=tcflush(*this,TCIFLUSH);
r=tcsetattr(*this,TCSANOW,m_ptio);
};

/ Get one char from terminal
//
Errno RawTerm::getch(char& ch)
{ Errno r;
size_t n;
if((r=ChrFile::read(&ch,sizeof(ch),n))!=Ok) {
WY_RETURN(r);
}
if(n==0) {
WY_RETURN(EIO);
}
return r;
};
Errno RawTerm::write(const char ch)
{ Errno r;
size_t n;
if((r=ChrFile::write(&ch,sizeof(ch),n))!=Ok) {
WY_RETURN(r);
}
if(n!=1) {
WY_RETURN(EIO);
}
return r;
};
Errno RawTerm::write(const char* str)
{ if(str==NULL) {
WY_RETURN(EFAULT);
}
const size_t slen=Wy::strlen(str);
Errno r;
size_t n;
if((r=ChrFile::write(str,slen,n))!=Ok) {
WY_RETURN(r);
}
if(n!=slen) {
WY_RETURN(EIO);
}
return r;
};
int main(int, char* [])
try {

Errno r;

if((r=mtty.write("中文"))!=Ok) {
WY_THROW(r);
}
for(;;) {
char ch;
if((r=mtty.getch(ch))!=Ok) {
WY_THROW(r);
}
if((ch=='q')||(ch=='Q')) {
break;
}
/* if((r=mtty.write(ch))!=Ok) {
WY_THROW(r);
}*/
cout << (unsigned char)ch << ',';
}
return 0;
} catch(const Errno& e) {
cerr << wrd(e) << WY_ENDL;
return e.c_errno();
} catch(...) {
cerr << "main caught(...)" WY_ENDL;
throw;
};

----------------------------------
[]$ ./a.out
中文27,91,51,126,27,91,51,59,50,126,27,91,51,59,53,126,27,91,51,59,51,126, // keystroke: del, sh-del, ctrl-del, alt-del

Re: Parsing multi-byte keystrokes

<u7bpe1$tnmt$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=491&group=comp.lang.c%2B%2B#491

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: F.Zwa...@HetNet.nl (Fred. Zwarts)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Mon, 26 Jun 2023 12:31:29 +0200
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <u7bpe1$tnmt$1@dont-email.me>
References: <u79ug0$i1ks$1@dont-email.me> <lZ3mM.83590$8uge.57668@fx14.iad>
<87ilbb13tu.fsf@nosuchdomain.example.com> <u7bee2$sht9$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 26 Jun 2023 10:31:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ef7b19493f15517552cbdbe57f1b48b3";
logging-data="974557"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/MoaVcqKBxWae9lJIRBapU"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:sF7HzjTkHSbXJIqLvOa5FIWg+J0=
Content-Language: en-GB
In-Reply-To: <u7bee2$sht9$5@dont-email.me>
 by: Fred. Zwarts - Mon, 26 Jun 2023 10:31 UTC

Op 26.jun..2023 om 09:21 schreef R.Wieser:
> Keith,
>
>> I know the OP wrote "console", but I suspect they're looking
>> for something that works on a terminal emulator.
>
> Nope, not an emulator. As said, "bullseye lite" doesn't have a GUI.
>
> As for the difference between a "console" and a "terminal" ? I must say
> that its not quite clear (read: confusing) to me , as it seems to be used
> interchangably. If you have a good description about the differences
> between a "console" and a "terminal" than I would like to hear about it.
>
> Simply said, to me a "console" is the text-based interface you get on a
> 'puter thats executing the commands. A "terminal" is the program you use
> to remotely(?) connect to such a console.
>
Console for Linux is normally used for the console which uses a keyboard
directly connected to the computer, e.g. with USB, or PS2.

A terminal is more generic. E.g., originally terminals where connected
with a serial line to a computer ad the terminal did the interpretation
of the keyboard. This made it impossible to detect certain keypresses,
such as Ctrl, Shift, etc. The terminal in such a case does not send e.g.
a 'Shift' press, an 'a' press, an 'a' release and a 'Shift' release, but
it sends an uppercase 'A'.
Therefore, your request to detect pressing and releasing keys is not
possible for generic terminal software.

Re: Parsing multi-byte keystrokes

<u7bqbb$tqaj$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=492&group=comp.lang.c%2B%2B#492

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: F.Zwa...@HetNet.nl (Fred. Zwarts)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Mon, 26 Jun 2023 12:47:07 +0200
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <u7bqbb$tqaj$1@dont-email.me>
References: <u79ug0$i1ks$1@dont-email.me> <lZ3mM.83590$8uge.57668@fx14.iad>
<87ilbb13tu.fsf@nosuchdomain.example.com> <u7bee2$sht9$5@dont-email.me>
<u7bpe1$tnmt$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 26 Jun 2023 10:47:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ef7b19493f15517552cbdbe57f1b48b3";
logging-data="977235"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/F4oG9rLXqzmxyhLkAoq2K"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:1t6bs1NYA8o3PX+1PDp7fBrSHQg=
Content-Language: en-GB
In-Reply-To: <u7bpe1$tnmt$1@dont-email.me>
 by: Fred. Zwarts - Mon, 26 Jun 2023 10:47 UTC

Op 26.jun..2023 om 12:31 schreef Fred. Zwarts:
> Op 26.jun..2023 om 09:21 schreef R.Wieser:
>> Keith,
>>
>>> I know the OP wrote "console", but I suspect they're looking
>>> for something that works on a terminal emulator.
>>
>> Nope, not an emulator.  As said, "bullseye lite" doesn't have a GUI.
>>
>> As for the difference between a "console" and a "terminal" ?   I must say
>> that its not quite clear (read: confusing) to me , as it seems to be used
>> interchangably.   If you have a good description about the differences
>> between a "console" and a "terminal" than I would like to hear about it.
>>
>> Simply said, to me a "console" is the text-based interface you get on a
>> 'puter thats executing the commands.   A "terminal" is the program you
>> use
>> to remotely(?) connect to such a console.
>>
> Console for Linux is normally used for the console which uses a keyboard
> directly connected to the computer, e.g. with USB, or PS2.
>
> A terminal is more generic. E.g., originally terminals where connected
> with a serial line to a computer ad the terminal did the interpretation
> of the keyboard. This made it impossible to detect certain keypresses,
> such as Ctrl, Shift, etc. The terminal in such a case does not send e.g.
> a 'Shift' press, an 'a' press, an 'a' release and a 'Shift' release, but
> it sends an uppercase 'A'.
> Therefore, your request to detect pressing and releasing keys is not
> possible for generic terminal software.

And, of course, with software keyboards on a touch screen, the situation
is again completely different. Generic terminal software hides such
differences, but that limits the possible operations.

Re: Parsing multi-byte keystrokes

<u7buf8$ue5n$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=493&group=comp.lang.c%2B%2B#493

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: addr...@is.invalid (R.Wieser)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Mon, 26 Jun 2023 13:30:45 +0200
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <u7buf8$ue5n$1@dont-email.me>
References: <u79ug0$i1ks$1@dont-email.me> <lZ3mM.83590$8uge.57668@fx14.iad><87ilbb13tu.fsf@nosuchdomain.example.com><u7bee2$sht9$5@dont-email.me> <877crq1va9.fsf@nosuchdomain.example.com>
Injection-Date: Mon, 26 Jun 2023 11:57:28 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3e13d070687dc98f7060108e206c1d81";
logging-data="997559"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pJuQ0Pf+0wdTF4sXMPd+4uJODrmXjby1V06tVK7VEyA=="
Cancel-Lock: sha1:buUziLU0zLm7vbxpC1comOCQVuc=
X-MSMail-Priority: Normal
X-Priority: 3
X-RFC2646: Format=Flowed; Original
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
 by: R.Wieser - Mon, 26 Jun 2023 11:30 UTC

Keith,

> The term "console", on Unix-like systems, typically refers to the
> system console, sometimes accessed via /dev/console, while a "terminal"
> is a more general term for a text-based interface, usually accessed via
> /dev/tty* or similar. (A typical user might never see the console.)

As I said, the difference between them is /at best/ confusing. That you
than introduce "system console" without offering any explanation to it does
not help either. :-|

I found a link which says that all things are terminals, and that a console
is just a special one (your "system console").

In that case I'm working on/in the system console.

Though I'm going to have a hard time remembering that ALT F1 is a console,
but that ALT F2...F6 are terminals (I probably, likely won't. Too little,
if any, distinction).

And it doesn't help that I have a couple of WYSE WY60 terminals standing
behind me. :-)

Regards,
Rudy Wieser

Re: Parsing multi-byte keystrokes

<u7buf9$ue5n$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=494&group=comp.lang.c%2B%2B#494

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: addr...@is.invalid (R.Wieser)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Mon, 26 Jun 2023 13:43:50 +0200
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <u7buf9$ue5n$2@dont-email.me>
References: <u79ug0$i1ks$1@dont-email.me> <Xm3mM.7635$3XE8.5950@fx42.iad><u7bee1$sht9$2@dont-email.me> <871qhy1usn.fsf@nosuchdomain.example.com>
Injection-Date: Mon, 26 Jun 2023 11:57:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3e13d070687dc98f7060108e206c1d81";
logging-data="997559"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18qjVxwAt2wEaap9Y9aegKNq7MBhSefUF78pR1tMknIKw=="
Cancel-Lock: sha1:JOY+qFsyKvXEeu1OA+rq6tBARrc=
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MSMail-Priority: Normal
X-Priority: 3
X-RFC2646: Format=Flowed; Original
 by: R.Wieser - Mon, 26 Jun 2023 11:43 UTC

Keith,

> You might take a look at the readline source code to see how it
> does that. It's certainly able to recognize the user pressing
> up-arrow (which typically sends Esc-[-A) and acting on it
> immediately, even if it doesn't expose that ability directly
> to the user.

As mentioned in my initial post, I have already switched the console input
to "raw", and as such I can see bytes coming in when I press keys. Thats
not the problem.

What is is turning those streams of bytes into individual keystrokes. I can
and already have parsed most keys for the "$TERM=linux" environment, but
would like *NOT* to use my own code if something build-in is available - and
getting support for other $TERM environments for free. :-)

Regards,
Rudy Wieser

Re: Parsing multi-byte keystrokes

<u7buf9$ue5n$3@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=495&group=comp.lang.c%2B%2B#495

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: addr...@is.invalid (R.Wieser)
Newsgroups: comp.lang.c++
Subject: Re: Parsing multi-byte keystrokes
Date: Mon, 26 Jun 2023 13:49:49 +0200
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <u7buf9$ue5n$3@dont-email.me>
References: <u79ug0$i1ks$1@dont-email.me> <e992ebdc-2d53-4134-9cfd-fd9339c8ffe5n@googlegroups.com>
Injection-Date: Mon, 26 Jun 2023 11:57:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3e13d070687dc98f7060108e206c1d81";
logging-data="997559"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185Q5kX6rw5FBh8a0Uo9AkcO2IgL3huRzHAb1VKdMZmAQ=="
Cancel-Lock: sha1:yIdmJQCu3K1iwCTnjXOjpT4mOOw=
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MSMail-Priority: Normal
X-RFC2646: Format=Flowed; Original
X-Priority: 3
 by: R.Wieser - Mon, 26 Jun 2023 11:49 UTC

Wij,

[snip code]

Thank you. Looking at the code I'm going to assume that receiving CTRL, ALT
and SHIFT modifier keys too is just a setting added to the "ntio.iflag"
field. I'll just have to check/find out which one it is. :-)

Regards,
Rudy Wiesr


devel / comp.lang.c++ / Parsing multi-byte keystrokes

Pages:123456
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor