🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Synthesizing keystrokes

#11834
From: Alan Bellingham
Date: Mon, 12 Jan 2004 14:57
34 lines
2293 bytes
"Miguel Q Moraes" <miguel@globaltrac.com.br> wrote:

>I have two computers and only one keyboard/monitor/mouse and I use a KVM
>switch to alternate between the two CPUs.
>I can switch between them using the following keystrokes: (CTRL+ALT+SHIFT) +
>(1 or 2) + (ENTER).
>I want to be able to do that remotely, so I need to simulate these
>keystrokes. I tried the following but it didn't work:

<snip>

>How can I do that?

Well, you'll need some way to talk to the KVM. This involves either
something like a serial/USB connection (which I've not seen on a KVM),
or you'll need a robot that sits by the keyboard and hits the relevant
keys as required.

The point is that the KVM is an input only device. You press keys on the
keyboard, the KVM works out whether you're talking to it or not, and if
not, it passes the keystrokes on to the computer. You're trying to
output to an input-only device.

Your code, on the other hand, is trying to emulate what happens on a
particular computer when it sees keys being pressed.

BTW - what on earth are you trying to do? If you're doing this remotely,
then you're not in front of the screen and keyboard to use them anyway!

Alan Bellingham
-- 
Team Mongolian Wok
<url:http://www.borland.com/newsgroups/> Borland newsgroup descriptions
<url:http://www.borland.com/newsgroups/netiquette.html>      netiquette
Technical Details
Message-ID: <81d500lc3b4bfb7re1pievdve3a2lmr0k2@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4002b020$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,14168aac82691d4
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-12 07:10:21 PST
From: Alan Bellingham <alanb@episys.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Synthesizing keystrokes
Date: Mon, 12 Jan 2004 14:57:04 +0000
Reply-To: alanb@episys.com
Message-ID: <81d500lc3b4bfb7re1pievdve3a2lmr0k2@4ax.com>
References: <4002b020$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.92/32.572
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 193.129.251.130
X-Trace: newsgroups.borland.com 1073919424 193.129.251.130 (12 Jan 2004 06:57:04 -0700)
Lines: 34
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail