🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer.misc
2 messages
2 total messages Started by Keith R. Bennett Mon, 25 Apr 1994 18:56
KC_VIRTUALKEY flag of WM_CHAR message
#228
Author: Keith R. Bennett
Date: Mon, 25 Apr 1994 18:56
11 lines
1301 bytes
Where does the KC_VIRTUALKEY flag get set by OS/2 or PM?  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?

Thanks for any answers...
- Keith
--
--------------------------------------------------------------------------
Keith Bennett                            Bennett Business Solutions, Inc.
C++/C Software Development               1605 Ingram Terrace
kbennett@access.digex.net                Silver Spring, MD USA 20906-5932
Re: KC_VIRTUALKEY flag of WM_CHAR message
#226
Author: 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  |
---------------------+
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads