Emulate Keyboard and Mouse

I have an application, which has a Windows 98 machine remotely control a QNX
4 machine running QNX Windows. I want to send mouse clicks and keystrokes to
the QNX Windows process.

The connection is up and running so the problem simplifies to a QNX process
inserting keystrokes and mouse clicks into the QNX Windows environment…

In DOS I would accomplish this by calling interrupts. Is this also possible
in QNX? Is there an easier way?

You only need to send event messages to the “screen” process.
Review SCREEN_INFO in “/windows/readme/toolkit4.2” and in
“/windows/include/window_input.h”.

We use this for sending keys from a specialized keypad.

You need to locate the Qnx Windows Screen process using qnx_name_locate().
Create and clear, a SCREEN_INFO buffer.
For keystrokes,
buffer._id = 0xFFFF;
buffer.absolute = -1;
buffer.code = ;
and then send the buffer to the screen process using Send().

We don’t do mouse clicks, but you may be able to figure it out from the
include file.
Also be aware, that any received screen events will then be sent to the
process of the current active window

ms…


Lorenz Prem <Lorenz.Prem@guidant.com> wrote in message
news:9fg3se$1ba$1@inn.qnx.com

I have an application, which has a Windows 98 machine remotely control a
QNX
4 machine running QNX Windows. I want to send mouse clicks and keystrokes
to
the QNX Windows process.

The connection is up and running so the problem simplifies to a QNX
process
inserting keystrokes and mouse clicks into the QNX Windows environment…

In DOS I would accomplish this by calling interrupts. Is this also
possible
in QNX? Is there an easier way?

Mike Schneider <Mike.Schneider@us.heidelberg.com> wrote:

You only need to send event messages to the “screen” process.
Review SCREEN_INFO in “/windows/readme/toolkit4.2” and in
“/windows/include/window_input.h”.

We use this for sending keys from a specialized keypad.

Also, take a look at:

ftp.qnx.com:/usr/free/qnx4/qwindows/utils/keyboard.tgz

This is a sample that draws a keyboard on the screen, then “inserts”
the characters clicked on with a mouse (or touchscreen) into the
input screen as if they were typed from a keyboard. It should be
a good example of how to insert input events.

-David

QNX Training Services
dagibbs@qnx.com