🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer.misc
Article #226

Re: KC_VIRTUALKEY flag of WM_CHAR message

#226
From: David Charlap
Date: Tue, 26 Apr 1994 20:34
35 lines
2253 bytes
Keith R. Bennett <kbennett@access1.digex.net> wrote:
>Where does the KC_VIRTUALKEY flag get set by OS/2 or PM?

By PM.  Non-PM apps don't receive WM_CHAR messages!

In the WM_CHAR message, there are many fields.  One of them, the vKey
field, is used when the key pressed doesn't correspond to a character
in the currently active codepage.  The KC_VIRTUALKEY flag is set when
this field contains valid data.

>Is it a signal or status of the keyboard controller, or does it set
>it if it sees a scan code which it thinks is a virtual key?

The keybaord controller only deal with scan codes and shift masks.
This data is stored in the WM_CHAR message.  The other data, though -
the character and vkey codes - are produced by PM and the keyboard
device driver.

Why do you need to know?  If you need keyboard access in a non-PM
application, you won't be using WM_CHAR messages to do it anyway.

Right now, you have to use DosDevIOCtl functions, stream I/O, or
16-bit APIs to access the keyboard without PM.  The 16-bit Kbd* calls
are probably easiest to use for now.

There are 32-bit equivalents of most of these calls, but you'll need
IBM's Developer's Connection CD to get the headers and documentation
to use them.

-- 
David Charlap        | The contents of this message are not the opinions of
david@visix.com      | Visix Software, or of anyone besides myself.
Visix Software, Inc. +-----------------------------------------------------
Member of Team-OS/2  |
---------------------+
Technical Details
Message-ID: <Covvsq.GIA@visix.com>
Path: arc1-ca.pugleaf.net!gmd.de!nntp.gmd.de!xlink.net!howland.reston.ans.net!vixen.cso.uiuc.edu!sdd.hp.com!sgiblab!wetware!spunky.RedBrick.COM!psinntp!psinntp!viper!david
References: <2ph3pb$psh@access1.digex.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cd94,be797f712374c3e6
X-Google-Attributes: gid10cd94,public
X-Google-Thread: 11307a,be797f712374c3e6
X-Google-Attributes: gid11307a,public
X-Google-ArrivalTime: 1994-04-27 05:50:54 PST
Newsgroups: comp.os.os2.programmer.misc,bit.listserv.os2-l
Path: arc1-ca.pugleaf.net!gmd.de!nntp.gmd.de!xlink.net!howland.reston.ans.net!vixen.cso.uiuc.edu!sdd.hp.com!sgiblab!wetware!spunky.RedBrick.COM!psinntp!psinntp!viper!david
From: david@visix.com (David Charlap)
Subject: Re: KC_VIRTUALKEY flag of WM_CHAR message
Message-ID: <Covvsq.GIA@visix.com>
Date: Tue, 26 Apr 1994 20:34:00 GMT
References: <2ph3pb$psh@access1.digex.net>
Organization: Visix Software, Inc., Reston, VA
Lines: 35