🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #15325

Re: Catching Numpad-Enter

#15325
From: Bob Gonder
Date: Wed, 09 Jul 2003 20:58
23 lines
2125 bytes
hgiese@ratiosoft.com (Helmut Giese) wrote:

>>Ummmm, are you sure about this?  If that's true, why can one, in some apps, 
>>define different mappings for them.  Matter of fact, every key on the keypad 
>>is different than the rest of the keys that may be similar.

>Sounds interesting. Could you be more specific?

Each key has it's own scan code which is sent to the computer. The
BIOS or Win translates the scan codes into ascii (or whatever the
locale lingo is).

If you use  ReadConsoleInput(stdin,&input_record,1,&num_read);
you can get all that info.
input_record.Event.KeyEvent.dwControlKeyState is 0x0100 for the keypad
enter.

For GUI, you might look at MapVirtualKey()
Might also look into LoadKeyboardLayout()
Click Overview in the help, and find where it talks about it many
pages into it.
I have no idea is this can be done in GUI, as Win likes to make things
"simple" for us.
Technical Details
Message-ID: <8cuogvc6o2l3pa3ldc2jpc2k5mc32o7jsi@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f0c54a3.3057091@forums.borland.com> <3f0c64ea$1@newsgroups.borland.com> <Xns93B37CFA5ED1DGregnospamMoWyldplea@207.105.83.65> <3f0c7592.11489854@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,d86545baafdd3fe
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-09 14:10:35 PST
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Catching Numpad-Enter
Date: Wed, 09 Jul 2003 13:58:12 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <8cuogvc6o2l3pa3ldc2jpc2k5mc32o7jsi@4ax.com>
References: <3f0c54a3.3057091@forums.borland.com> <3f0c64ea$1@newsgroups.borland.com> <Xns93B37CFA5ED1DGregnospamMoWyldplea@207.105.83.65> <3f0c7592.11489854@forums.borland.com>
X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.31.165.46
X-Trace: newsgroups.borland.com 1057784277 67.31.165.46 (9 Jul 2003 13:57:57 -0700)
Lines: 25
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail