🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2950

Re: keyboard event for special characters

#2950
From: Bob Gonder
Date: Thu, 19 Oct 2006 02:54
30 lines
1865 bytes
DeKayA@bellsouth.net wrote:

>Maybe I am doing this all wrong!

Could be.

>  char *character = SCharacter.c_str();
>    keybd_event(*character, 0, 0, 0);

It looks like keybd_event wants a vitual key code as the first
parameter, not an ASCII character.
Take a look at VkKeyScan()

keybd_event( VkKeyScan(*character), 0, 0, 0 );

or

PostMessage( handle, WM_KEYDOWN , VkKeyScan(*character), 0 );
PostMessage( handle, WM_KEYUP , VkKeyScan(*character), 0xC0000000 );


>Bottom line:  How do I send  CR/LF   and special characters

Search your Help for "Virtual-Key Codes" for a list.
VK_RETURN
\n is undefined

You already discovered that period is
VK_DECIMAL	6E	Decimal key 
otherwise known as ASCII  'n'
Technical Details
Message-ID: <9iodj2hdagj01cl2n7pnl6aaerm9504msc@4ax.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <45366331.17177459@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,8b5b289e42156a77
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: keyboard event for special characters
Date: Wed, 18 Oct 2006 19:54:52 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <9iodj2hdagj01cl2n7pnl6aaerm9504msc@4ax.com>
References: <45366331.17177459@forums.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.69.90.106
X-Trace: newsgroups.borland.com 1161226488 69.69.90.106 (18 Oct 2006 19:54:48 -0700)
Lines: 34
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail