|
|
|
date: Mon, 11 Aug 2008 09:05:34 -0700,
group: microsoft.public.win32.programmer.ui
back
Re: How to write a keyboard emulator?
On Mon, 11 Aug 2008 09:05:34 -0700, "Siegfried Heintze"
wrote:
>Thanks for the previous responses. I am reading your references. I just
>finsihed reading http://www.joelonsoftware.com/articles/Unicode.html for the
>first time and will probably have to read it again.
>
>I need to write a keyboard emulator and my problem is that I don't
>understand exactly what a keyboard does.
>My keyboard emulator will display a keyboard on the monitor and use hit
>testing to detect which key the user has clicked on. Left mouse clicking on
>a key once will simulate depressing a key and left mouse clicking a second
>time will simulate releasing the key.
So the user needs to press a key twice to send one character? I
wouldn't want to use such a keyboard.
>(1) Does that logic to combine the scan codes for modifier keys (like shift
>and ctrl) to produce a virtual keycode happen in the keyboard or the OS?
I haven't tried to understand the details of your description, but it
seems way more complicated than necessary. Petzold and Yao present a
calculator emulator in their "Programming Windows 95" book. It
provides a pushbutton for each key, detects when each button is
pressed, and uses WM_CHAR to send the button's label.
-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).
Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com
date: Mon, 11 Aug 2008 15:59:06 -0400
author: unknown
|
|