🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #13917

Re: receiving virtual keyboard commands

#13917
From: Bill Turner
Date: Thu, 01 Feb 1990 17:45
15 lines
1021 bytes
> Hi, what kind of message does a program receive when a virtual key is
> pressed, i.e. VK_RIGHT, VK_UP, etc...

All keystroke messages come in under the WM_KEYDOWN and WM_KEYUP messages.
However, for ASCII keys, this isn't too helpful, which is why there is the
call to TranslateMessage in your main loop.

The message sequence for an ASCII key ('A', for example) is

    WM_KEYDOWN,  wParam = VK_A
    WM_CHAR, wParam = 'A' (or 'a', depending on the shift key state)
    WM_KEYUP, wParam = VK_A

--Bill Turner (bturner@hp-pcd.hp.com)
HP Interface Technology Operation
Technical Details
Message-ID: <106580080@hpcvlx.cv.hp.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-sdd!hp-pcd!hpcvlx!bturner
References: <34028@ucbvax.BERKELEY.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-sdd!hp-pcd!hpcvlx!bturner
From: bturner@hpcvlx.cv.hp.com (Bill Turner)
Newsgroups: comp.windows.ms
Subject: Re: receiving virtual keyboard commands
Message-ID: <106580080@hpcvlx.cv.hp.com>
Date: 1 Feb 90 17:45:25 GMT
References: <34028@ucbvax.BERKELEY.EDU>
Organization: Hewlett-Packard Co., Corvallis, OR, USA
Lines: 15