Mailing List gnuports@2rosenthals.com Archived Message #38

From: "Dave Yeo" <gnuports@2rosenthals.com> Full Headers
Undecoded message
Subject: Re: [GNU Ports] getting a single keypress
Date: Mon, 16 May 2022 19:23:01 -0700
To: GNU Ports for eCS Mailing List <gnuports@2rosenthals.com>

On 05/16/22 07:12 PM, Steven Levine wrote:
Hi,

KbdCharIn does.
For low ASCII (below 127) it seems to do the job
This is more or less true.

fprintf(stderr, "got key: %c\n", val);
I still suspect you were printing a scan code.

Try

 fprintf(stderr, "got key: %c %x\n", val, val);

so you can see the hex value too.

Seems so,
H:\tmp>test.exe
terminal fd: 0
got key: Î ffffffd7
got key: w 77
got key: e 65
got key: r 72
got key: t 74
got key: y 79
got key: u 75
got key: i 69
got key: q 71

Dave

Subscribe: Feed, Digest, Index.
Unsubscribe
Mail to ListMaster