🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Handling key presses

#7406
From: Bob Gonder
Date: Thu, 03 Feb 2005 17:33
19 lines
1749 bytes
Umut Ozden wrote:

>I'm looking for the same in BCB. I know that there are OnKeyDown and OnKeyUp
>events. If I supply OnKeyDown and OnKeyUp events for Form1 and if Form1 is
>empty the OnkeyDown and OnKeyUp for Form1 event handlers execute, but if I
>place anything on Form1, for example a button, the OnkeyDown and OnKeyUp
>event handlers for Form1 don't execute.

I don't do VCL....Can you catch them at the Application level?

>So, there should be some Win32API for handling key presses, what are the
>related functions?. It's enough for me to detect that an arbitrary key is
>down or up as port number 0x60 in MSDOS.

The DOS equivelents are associated with INPUT_RECORD
see   ReadConsoleInput()

Also take a look at SetWindowsHookEx() with WH_KEYBOARD and
KeyboardProc()
Technical Details
Message-ID: <dhn4015hes7aemc82cvopqqk8j4l5jc8h3@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4201e988@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,14ca66ffe188d912
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Handling key presses
Date: Thu, 03 Feb 2005 09:33:04 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <dhn4015hes7aemc82cvopqqk8j4l5jc8h3@4ax.com>
References: <4201e988@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.69.90.62
X-Trace: newsgroups.borland.com 1107451983 69.69.90.62 (3 Feb 2005 09:33:03 -0800)
Lines: 21
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail