🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Catching Numpad-Enter

#15333
From: Chris Hill
Date: Thu, 10 Jul 2003 03:39
19 lines
1553 bytes
On Wed, 09 Jul 2003 17:47:11 GMT, hgiese@ratiosoft.com (Helmut Giese)
wrote:

>Hello out there,
>is there a way to detect if the 'enter' key on the numeric key pad was
>pressed - as opposed to the 'normal' enter key?
>Any hints will be greatly appreciated.
>Helmut Giese

Yes, there is a way.  The WM_KEYDOWN, WM_KEYUP, WM_CHAR messages have
additional information beyond the virtual key code (WM_KEYXXX) and
character value (WM_CHAR).  The lParam contains this additional
information.  You are interested in the "extended key" bit which will
be set for the keypad but clear for the normal enter key.  See the
documentation for more information including the exact position of
this bit within the lParam.

Chris Hill
Chris244@aol.com
Technical Details
Message-ID: <3f0cde11.920535210@forums.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f0c54a3.3057091@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 20:40:34 PST
From: Chris244@aol.com (Chris Hill)
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Catching Numpad-Enter
Date: Thu, 10 Jul 2003 03:39:47 GMT
Message-ID: <3f0cde11.920535210@forums.borland.com>
References: <3f0c54a3.3057091@forums.borland.com>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: 12.221.66.183
X-Trace: newsgroups.borland.com 1057808385 12.221.66.183 (9 Jul 2003 20:39:45 -0700)
Lines: 19
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail