Path: 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 > 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