Hagstrom Electronics USBtoUSB User manual

USBtoUSB
USB Serial Port to USB
Keyboard and Mouse Action
User Manual
Toll Free 888-690-9080
Phone: (540) 465-4677 Fax: (540) 465-4678
Monday through Friday, 8:00 am to 5:00 pm (EST)
www.hagstromelectronics.com
1986 Junction Road, Strasburg, VA 22657
Copyright © 2020 HAGSTROM ELECTRONICS, INC.
V. 09.20
HAGSTROM
ELECTRONICS, INC.

Warranty
HAGSTROM ELECTRONICS, INC. warrants this
product against defects in material or workmanship for a
period of ONE YEAR from the original purchase date. We will
repair or replace (at our option) the returned defective unit
at no charge during this warranty period.
No responsibility is assumed for any special, incidental,
or consequential damage resulting from the use of or
inability to use this product. In no case is HAGSTROM
ELECTRONICS, INC. to be liable for any amount which
exceeds the purchase price of the unit, regardless of the
claim.
No other warranty, written or verbal, is authorized. This
warranty is applicable only to units sold in the United States.
Units sold outside the United States are covered by a similar
warranty.
Great care has been taken during the assembly, testing, and burn-in of
your USBtoUSB to ensure its performance. If you have any questions,
please send us an email or give us a call. Support is available Monday
through Friday, 8:00 am to 5:00 pm (EST).
Call Toll Free 888-690-9080, or (540) 465-4677
NOTICE: The USBtoUSB product is designed to be used by technically
oriented computer users.
Thank you for purchasing the model USBtoUSB Adapter.
HAGSTROM ELECTRONICS, INC.
is pleased that you have selected this product for your application.
This unit is may be used a variety of ways in order to meet your
specific requirements. Please take a few minutes to read this
manual before using your USBtoUSB.
If you have any questions about the use of the USBtoUSB not
covered in this manual, please contact us directly. We offer toll
free technical product support from 8:00am to 5:00pm M-F
Eastern Time 888-690-9080. You may also send an email to
We respond to all email requests within one business day.

Introduction to the USBtoUSB 3
Translation Modes of the USBtoUSB 3
ASCII Mode 3
Extended ASCII Mode 4
Key Number Mode 6
Additional Key Number Mode Commands 8
Key Number Mode Examples 9
Producing Mouse Action on the Target Computer 10
Mouse Packet Examples 12
Sending Serial Control Commands 13
USBtoUSB Configuration Program 14
USBtoUSB Connections & Specifications 17
17 2
CONTENTS
Operating Voltage 5 Volts DC +/- 5%
(Powered from USB ports)
Operating Current Less than 100 ma each port
Operating Temp. 0 to 70 Degrees C
Computer Interface USB - Target Computer
USB - Com Port Source
Cable Length Maximum 15ft each port
USB Com Port Protocol 19200, 8 , N, 1
USBtoUSB Specifications
USBtoUSB Connections
Using the included USB cables, attach the Com Port USB connector
to the computer that will be sending commands to the USBtoUSB.
Attach the KBD/MOUSE connector to the target computer where
the keyboard and mouse actions will be generated based on the
commands.
USB Com Port
device, attach
to the computer
sending the serial
commands.
USB KBD/MOUSE Port, attach
to the computer where the
keyboard and mouse actions
are to take place.
Questions or Comments?
Please send us an email!
www.hagstromelectronics.com
email: sales@hagstromelectronics.com
USB Data from USB Com
Port on one Computer
Generates Keyboard and Mouse
actions on another Computer
This port is also to be
plugged into the computer
running the USBtoUSB.exe
configuration program.

Introduction to the USBtoUSB
The USBtoUSB Keyboard/Mouse device is a product which emulates a
USB Com Port on one computer and a USB keyboard and mouse on
a target computer. Commands sent from the computer with the Com
Port produce keyboard and mouse actions on the target computer.
The USB target port of this device can be connected to any USB port
that supports a standard USB Keyboard and Mouse. No special drivers
are required. The USBtoUSB Com Port also uses standard drivers.
The USBtoUSB is configurable for three different modes of serial data
translation. This unit is shipped in ASCII mode, but can be changed to
other modes using the supplied “USBtoUSB.EXE” program.
Translation Modes of the USBtoUSB
The USBtoUSB receives data from it’s USB Com Port and translates
that data into USB keystrokes and mouse action on another computer.
USB Com Port data can be translated using one of three modes. ASCII
Mode, Extended ASCII Mode, or Key Number Mode.
ASCII MODE (Default Mode)
The ASCII mode is the default factory setting for the method of data
translation. In this mode, printable ASCII characters are sent to the
USB Com Port as a one byte value, each in the range of 0x00 to 0x7F
(0 to 127 decimal). Every character received in this mode generates it’s
corresponding USB keystroke on the computer where the USBtoUSB
KBD/MOUSE port is connected. See the ASCII table on the next page
for a list of the characters recognized and translated for ASCII mode.
Example: If a one byte value of 0x41 (decimal 65) is sent to the USB
Com Port in this mode, a capital “A” character will be produced as a
keystroke on the target computer’s USB port.
ASCII characters sent to the Com Port which are out of the 0x00 to
0x7F range will be ignored in this mode.
3
The configuration may also be read from the USBtoUSB unit by
selecting the button “Read From USBtoUSB”. The configuration in the
USBtoUSB attached to the computer’s USB port will be read into the
configuration parameters on the screen.
Once a configuration has been created, it is recommended that it be
stored on the computer so that it may be recalled at a later time. Use
the “File” menu to perform saving and opening of configurations.
Saving the configuration to a file on the computer provides an easy
way to be able to recall the same configuration at a later time to save
into additional USBtoUSB units.
16
Custom USBtoUSB Options
We offer special modifications to our standard USBtoUSB unit to conform to your exact
specifications. Customizations include different translation modes, different enclosure,
etc. just to name a few options. Let us know if you have special requirements. Please
call or email with your specific custom needs.
Note about the X and Y size settings. The information about the
screen size is important for controlling the cursor with the mouse control
packets. The program will show the current settings on the machine
where the USBtoUSB.exe program is being run.
Assuming the program is being run on the target machine, no changes
are required to the values the program populates. If the USBtoUSB will
be run on a different computer, change the X and Y settings to match
that system if they differ from the target machine’s screen resolution.

4
Value Character Value Character Value Character Value Character
Dec Hex Dec Hex Dec Hex Dec Hex
00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
00
01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F
none
none
none
none
none
none
none
none
Backspace
Tab
none
none
none
Return
none
none
none
none
none
none
none
none
none
none
none
none
none
Esc
none
none
none
none
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F
30
31
32
33
34
35
36
37
38
39
3A
3B
3C
3D
3E
3F
Space
!
“
#
$
%
&
‘
(
)
*
+
,
_
.
/
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
40
41
42
43
44
45
46
47
48
49
4A
4B
4C
4D
4E
4F
50
51
52
53
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
[
\
]
^
-
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
60
61
62
63
64
65
66
67
68
69
6A
6B
6C
6D
6E
6F
70
71
72
73
74
75
76
77
78
79
7A
7B
7C
7D
7E
7F
`
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
{
|
}
~
none
ASCII Mode Translation Table
The ASCII mode table below lists the standard ASCII characters to be
sent to the USB Com Port for producing a corresponding keystroke on
the target computer when processed by the USBtoUSB unit.
Extended ASCII Mode
The USBtoUSB Extended ASCII Mode of operation allows for the
standard ASCII character set (values 0x00 to 0x7F), and an extended
ASCII character set (values 0x80 to 0xFF). When a byte is sent to the
USB Com Port in Extended ASCII mode, it produces a USB keystroke
on the target PC which corresponds to the table on the next page.
15
ASCII Mode Translation Table
To configure the USBtoUSB, select the Control Mode from the
dropdown box to choose the conversion mode. Select between
ASCII (factory default), Extended ASCII, or Key Number Mode.
See pages 3-9 for a description of each of the control modes.
Next, enter the screen X and Y size for the target computer’s dis-
play settings. The X and Y sizes are used to set the USBtoUSB
internal storage such that the serial control for the mouse cursor
will better match the target system. When the USBtoUSB.exe pro-
gram is started, the X and Y values a are populated with the target
computer’s current display settings. The user may change these
if needed, but in general, the values selected by the program are
the proper values to be used. (See note on page 16)
Saving the Configuration to the USBtoUSB
Once the desired parameters have been set on the USBtoUSB
Configuration Utility Screen, it must be saved to the USBtoUSB unit to
begin operation according to those settings.
Select the button “Save To USBtoUSB” to write the configuration to
the unit. Once the configuration has been written, the USBtoUSB will
restart and begin operating according to the selected mode.

5
Value Character Value Character Value Character Value Character
Dec Hex Dec Hex Dec Hex Dec Hex
00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
00
01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F
none
none
none
none
none
none
none
none
Backspace
Tab
none
none
none
Return
F11
F12
none
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
Esc
none
none
none
none
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F
30
31
32
33
34
35
36
37
38
39
3A
3B
3C
3D
3E
3F
Space
!
“
#
$
%
&
‘
(
)
*
+
,
_
.
/
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
40
41
42
43
44
45
46
47
48
49
4A
4B
4C
4D
4E
4F
50
51
52
53
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
[
\
]
^
-
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
60
61
62
63
64
65
66
67
68
69
6A
6B
6C
6D
6E
6F
70
71
72
73
74
75
76
77
78
79
7A
7B
7C
7D
7E
7F
`
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
{
|
}
~
none
Value Character Value Character Value Character Value Character
Dec Hex Dec Hex Dec Hex Dec Hex
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
80
81
82
83
84
85
86
87
88
89
8A
8B
8C
8D
8E
8F
90
91
92
93
94
95
96
97
98
99
9A
9B
9C
9D
9E
9F
€
none
‚
ƒ
„
…
†
‡
ˆ
‰
Š
‹
Œ
none
Ž
none
none
‘
’
“
”
•
–
—
˜
™
š
›
œ
none
ž
Ÿ
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
AA
AB
AC
AD
AE
AF
B0
B1
B2
B3
B4
B5
B6
B7
B8
B9
BA
BB
BC
BD
BE
BF
nb Space
¡
¢
£
¤
¥
¦
§
¨
©
ª
«
¬
none
®
¯
°
±
²
³
´
µ
¶
·
¸
¹
º
»
¼
½
¾
¿
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
C0
C1
C2
C3
C4
C5
C6
C7
C8
C9
CA
CB
CC
CD
CE
CF
D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
DA
DB
DC
DD
DE
DF
À
Á
Â
Ã
Ä
Å
Æ
Ç
È
É
Ê
Ë
Ì
Í
Î
Ï
Ð
Ñ
Ò
Ó
Ô
Õ
Ö
×
Ø
Ù
Ú
Û
Ü
Ý
ß
à
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
E0
E1
E2
E3
E4
E5
E6
E7
E8
E9
EA
EB
EC
ED
EE
EF
F0
F1
F2
F3
F4
F5
F6
F7
F8
F9
FA
FB
FC
FD
FE
FF
à
á
â
ã
ä
å
æ
ç
è
é
ê
ë
ì
í
î
ï
ð
ñ
ò
ó
ô
õ
ö
÷
ø
ù
ú
û
ü
ý
þ
ÿ
Extended ASCII Mode Translation Table
14
The user’s software should always open the USBtoUSB Com Port
using 19,200 BAUD, 8 Bit characters, No Parity, and One Stop
Bit.
When the USBtoUSB Com Port is attached to the user’s computer,
it will be assigned a particular Com Port Number. In order to send
communication to the USBtoUSB, the proper Com Port number
must be opened to communicate with the USBtoUSB device.
The included CD contains examples in various programming lan-
guages for sending commands to the USBtoUSB Com Port for the
different modes of translation.
Use these programming examples as a starting point for the ap-
plication software that will be used to control the keyboard and
mouse actions through the USB com port to the target computer.
USBtoUSB Configuration Program
The unit features programmable settings for selecting the serial
data translation mode and setting the target computer screen size
information into the USBtoUSB unit for the user’s application.
The included CD contains the program “USBtoUSB.exe”. Copy
the entire contents of the CD to a dedicated folder on the target
computer’s drive. Once copied, run “USBtoUSB.exe”.

When using the Extended ASCII mode, characters sent to the USB
Com Port are in the range of 0x00 to 0xFF (0 to 255 decimal). The
corresponding keystrokes from the page 5 table will be generated.
Extended ASCII Mode allows for the ANSI/ISO Latin-1 character group
in the range of 0x80 to 0xFF (128 to 255 decimal) to be produced as
well as the standard 0x00 through 0x7F ASCII codes. Additionally in
this mode, the F1-F10 keys are supported for the character range of
codes 0x11 to 0x1A values respectively. F11 and F12 keys are sent for
Com Port characters of 0x0E and 0x0F in the Extended ASCII mode.
Example 1: If the value 0x41 (decimal 65) is received by the USB
Com Port in this mode, a capital “A” character will be produced on the
target computer’s USB port as a keystroke.
Example 2: If the value 0xA9 (decimal 169) is received by the USB
Com Port in this mode, a “©” character will be produced on the target
computer’s USB port as a keystroke.
Key Number Mode
The Key Number Mode provides complete control of the generation of
the make (activation) and break (deactivation) of any standard keyboard
key on the target computer. In this mode, a single byte sent to the USB
Com Port will command the make or break of a specific keyboard
key at the target computer. This mode allows for generation of any
keystroke or combination of keystrokes on the target computer.
In general, to make a key (generate a press of a specific key), a one
byte value between 0x00 and 0x7F is sent to the Com Port of the
USBtoUSB. The key specified will be seen as held down on the target
computer just as if someone was physically holding down that key on
a keyboard.
Each time a make is done for a key, a corresponding break (release) of
that key must be done at a later time to deactivate it. The break code
for a key is the same value as the make code plus 0x80. The break
code releases the key that was activated earlier by a make code. See
the following table for Key Number Mode make and break codes.
613
In the next example, four Com Port mouse packets are sent to
emulate a double left mouse click on the target computer.
Packet 1 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x09 (left mouse
button on). Delay around 150 msec after sending this packet for
the system to see the button.
Packet 2 - 0x00, 0x00, 0x00 0x00, 0x00, 0x08 (left mouse
button off). Delay 150 msec again for the system to see the button
release and create time between the release and activation of the
left mouse button in step 3 below.
Packet 3 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x09 (left mouse
button on). Delay around 150 msec for the system to see the
button.
Packet 4 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 (left mouse
button off). No delay required after this release.
Cursor position, scroll wheel movement and button actions may
all be implemented within the same packet. The examples above
focus only on a particular action at a time for clarity. For instance,
a command that sends both X and Y cusor movement can also
send button information and/or scroll wheel movement.
Note that X and Y coordinates require the proper X and Y screen
resolution set by the USBtoUSB.exe to obtain a 1:1 ratio beween
the commanded values and the resulting cursor position.
Sending Serial Control Commands
The CD included with the unit contains source code examples in
various programming languages to help the user get started on
their own Com Port control software. Use these examples as a
reference point for writing programs on the computer attached to
the USBtoUSB Com Port connection.

US Key Number Table (Decimal Values)
An international key number table is available on the CD provided with the USBtoUSB.
7
Key Make Break
`~ 01 129
1! 02 130
2@ 03 131
3# 04 132
4$ 05 133
5% 06 134
6^ 07 135
7& 08 136
8* 09 137
9( 10 138
0) 11 139
-_ 12 140
=+ 13 141
BS 15 143
Tab 16 144
Q 17 145
W 18 146
E 19 147
R 20 148
T 21 149
Y 22 150
U 23 151
I 24 152
O 25 153
P 26 154
[{ 27 155
]} 28 156
\| 29 157
Caps 30 158
A 31 159
S 32 160
D 33 161
F 34 162
G 35 163
H 36 164
Key Make Break
J 37 165
K 38 166
L 39 167
;: 40 168
‘“ 41 169
Enter 43 171
L Shift 44 172
Z 46 174
X 47 175
C 48 176
V 49 177
B 50 178
N 51 179
M 52 180
,< 53 181
.> 54 182
/? 55 183
R Shift 57 185
L Ctrl 58 186
L Alt 60 188
Space 61 189
R Alt 62 190
R Ctrl 64 192
L Win 70 198
R Win 71 199
Win APL 72 200
Insert 75 203
Delete 76 204
L Arrow 79 207
Home 80 208
End 81 209
Up Arrow 83 211
Dn Arrow 84 212
Page Up 85 213
Page Dn 86 214
Key Make Break
R Arrow 89 217
NumLock 90 218
7 (Num) 91 219
4 (Num) 92 220
1 (Num) 93 221
/ (Num) 95 223
8 (Num) 96 224
5 (Num) 97 225
2 (Num) 98 226
0 (Num) 99 227
* (Num) 100 228
9 (Num) 101 229
6 (Num) 102 230
3 (Num) 103 231
. (Num) 104 232
- (Num) 105 233
+ (Num) 106 234
Enter (Num) 108 236
Esc 110 238
F1 112 240
F2 113 241
F3 114 242
F4 115 243
F5 116 244
F6 117 245
F7 118 246
F8 119 247
F9 120 248
F10 121 249
F11 122 250
F12 123 251
Prt Scr 124 252
Scrl Lk 125 253
Pause/Break 126 254
When sending data to the Com Port on the USBtoUSB to generate
keystrokes at the target computer in Key Number Mode, use the
values shown above to produce the desired “make” and “break”
actions for the corresponding key.
12
When sending a mouse control packet for cursor movement only,
be sure to send all “0” values for the scroll wheel and mouse
button bits, provided those options are not being used for mouse
actions at that time.
Mouse Packet Examples
The packet below is an example of a packet sent to the USBtoUSB
Com Port to command the cursor to a screen postion of X =
100, Y = 520.
0x00, 0x00, 0x64, 0x02, 0x08, 0x08
Start XMS XLS YMS YLS Scroll
Sending the values shown above will cause the cursor to move to
the screen position 100, 520. The position of the mouse cursor
for the values sent is an absolute screen position and will be
repeatable for a specific computer and screen resolution.
A screen position of 0,0 represents the upper left of the screen.
To send the cursor to specific coordinates on the screen, use the 2
byte values for both X and Y in the packet described above.
The cursor position that results from a command packet will
depend on the particular computer’s display settings. Moving the
cursor to a desired screen position may require working with a few
values to get the exact value for a specific application.
The following packet can be used to send the scroll wheel
command of up one position to the computer.
How far the scroll moves on the computer screen depends on the
scroll system settings of the target computer.
0x00, 0x00, 0x00, 0x00, 0x00, 0x18

8
By using the make and break commands in Key Number Mode, any
sequence that can by manually entered on a keyboard can be produced
with the USBtoUSB. Use this Key Number Mode to emulate single
keystrokes or combinations such as Ctrl+F1, or Shift+Alt+F5, etc.
Additional Key Number Mode Control Commands
The USBtoUSB features two additional commands for keyboard action.
The first command provides a way to clear the keyboard buffer and is
useful for ensuring that no keys are left in the “ON” state. The second
command allows for the polling of the keyboard status LED states. This
polling command is useful for checking the Shift Lock state, or for making
sure of the Num Lock state before using Num Lock affected keys.
0x38 - USB Buffer Clear Command. Sending the byte 0x38 to the
USBtoUSB Com Port port results in the device’s internal USB keyboard
buffer being cleared. Use of this command ensures that all made keys
currently in the keyboard buffer are released.
0x7F - Status LED Read Command. Sending a code 0x7F to the USBtoUSB
Com Port results in the return of a character in the range of ASCII
“0” - “7”. The USBtoUSB Com Port response character reflects the
current state of the Scroll Lock, Caps Lock, and Num Lock LEDs on the
target computer system as listed in the chart below.
ASCII Response Scroll Lock Status Caps Lock Status Num Lock Status
“0” Off Off Off
“1” Off Off On
“2” Off On Off
“3’ Off On On
“4” On Off Off
“5” On Off On
“6” On On Off
“7” On On On
11
[W2] - The most significant bit of the scroll wheel movement
magnitude.
[W1] - Bit 1 of the three bit value for scroll wheel movement.
[W0] - Least significant bit of the scroll wheel movement value.
[1] - Bit 3 of the #6 byte is always “1”. Sending “0” for this bit will
cause the entire mouse control packet to be ignored.
[MM] - State of the middle mouse button. Set to 1 for middle
mouse button on, 0 for the button to be off.
[MR] - State of the right mouse button. Set to 1 for right mouse
button on, 0 for the button to be off.
[ML] - State of the left mouse button. Set to 1 for left mouse
button on, 0 for the button to be off.
NOTES - When sending this six byte mouse command packet to
the USBtoUSB Com Port, the five bytes following the first 0x00
byte should be sent with no more than 50msec between each
byte. The starting value 0x00 must always be followed by five
additional bytes to complete the mouse control packet and avoid
any confusion between mouse control and keystroke commands.
The scroll wheel magnitude command is a 4 bit signed value
located in bits Ws through W0, and in the range of 0x00 to 0x07
for up movement, 0x0F to 0x08 for down movement.
The three mouse button bits [MM], [MR], and [ML] command the
states of the mouse buttons as seen by the target computer. A “1”
in the respective bit indicates the mouse button is on, while a “0”
indicates the button is off. Be sure to command the release of any
mouse buttons that were in the on state at a later time once the
mouse button task has completed.

9
Key Number Mode Examples
Generation of keystrokes on the target computer is done through
the sending of special one byte codes to the USBtoUSB Com Port
when in the Key Number Mode.
Each standard key of the computer keyboard is assigned a “make”
code to emulate the press of a key, and a “break” code, which
results in the release of the key. The Key Number Table on page
7 lists each of the supported keys and their corresponding make
and break codes.
From the keycode table, the value of 2 (0x02) can be sent to the
Com Port on the unit to generate the “make” or press and hold
of the “1” key on the target computer. Sending a byte to the
USBtoUSB Com Port with a value of 130 (0x82) will result in the
release of the “1” key on the target computer.
Important: For any key that has been previously sent a “make”
code, a “break” code of that key must be sent at a later time.
Failure to send the corresponding break code will leave the key
in the down state on the target computer, which may result in
unintended keystrokes when new actions are sent. The last key
left in the make state without a break will generally repeat until
the break code is sent. Never command more than 60 keys in
the “make” state at the same time as this will exceed the standard
USB protocol keyboard buffer length for the USBtoUSB device.
The use of make and break codes allows the user to create virtu-
ally any keystroke combination. For example, if a sequence of
CTRL+ALT+F1 was needed, the following decimal codes would
be sent; 58 (Make L Ctrl), 60 (Make L Alt), 112 (Make F1), 240
(Break F1), 188 (Break L Alt), 186 (Break L Ctrl). Note that the
values shown in the example are the decimal values of a single
byte to be sent for each of the key actions for make and break.
Producing Mouse Action on the Target PC
The USBtoUSB is capable of controlling the mouse cursor and mouse
button states of the target computer through a special six byte command
sequence. This same command sequence sent to the Com Port of the
USBtoUSB can be used in any of the operating modes.
The six byte mouse control sequence is construced as follows:
Byte#1 Byte#2 Byte#3 Byte#4 Byte#5 Byte#6
[Start] [X PosMS] [X PosLS] [Y PosMS] [Y PosLS] [Scroll/Buttons]
Byte #1 - Always a 0x00 value, indicates start of packet.
Byte #2 & #3 - A two byte value which dictates the X axis position
of the mouse cursor on the screen. A value of 0 will send the
cursor to the leftmost screen position. Byte #2 is the Most
Siginificant (MS) byte of the X position value, and Byte #3 is the
Least Significant (LS) part of the X position value.
Byte #4 & #5 - A two byte value which dicatates the Y axis position
of the mouse cursor on the screen. A value of 0 will send the
cursor to the top of the screen. Byte #4 is the MS byte of the Y
position value, and Byte #5 is the LS part of the Y position value.
Byte #6 - Byte for Scroll Wheel movement and mouse button
control. The upper 4 bits of this byte contain a signed value for
scroll wheel movement, while the lower 3 bits command the mouse
Left, Right, and Middle button activation and deactivation.
This Byte #6 is constructed as shown,
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
[Ws] [W2] [W1] [W0] [1] [MM] [MR] [ML]
[Ws] - The sign of the scroll wheel movement. A zero in this bit
commands up movement on the scroll wheel, a one in this bit
produces down scroll wheel movement. Movement magnitude
based on the signed value in Ws through W0 values.
10

9
Key Number Mode Examples
Generation of keystrokes on the target computer is done through
the sending of special one byte codes to the USBtoUSB Com Port
when in the Key Number Mode.
Each standard key of the computer keyboard is assigned a “make”
code to emulate the press of a key, and a “break” code, which
results in the release of the key. The Key Number Table on page
7 lists each of the supported keys and their corresponding make
and break codes.
From the keycode table, the value of 2 (0x02) can be sent to the
Com Port on the unit to generate the “make” or press and hold
of the “1” key on the target computer. Sending a byte to the
USBtoUSB Com Port with a value of 130 (0x82) will result in the
release of the “1” key on the target computer.
Important: For any key that has been previously sent a “make”
code, a “break” code of that key must be sent at a later time.
Failure to send the corresponding break code will leave the key
in the down state on the target computer, which may result in
unintended keystrokes when new actions are sent. The last key
left in the make state without a break will generally repeat until
the break code is sent. Never command more than 60 keys in
the “make” state at the same time as this will exceed the standard
USB protocol keyboard buffer length for the USBtoUSB device.
The use of make and break codes allows the user to create virtu-
ally any keystroke combination. For example, if a sequence of
CTRL+ALT+F1 was needed, the following decimal codes would
be sent; 58 (Make L Ctrl), 60 (Make L Alt), 112 (Make F1), 240
(Break F1), 188 (Break L Alt), 186 (Break L Ctrl). Note that the
values shown in the example are the decimal values of a single
byte to be sent for each of the key actions for make and break.
Producing Mouse Action on the Target PC
The USBtoUSB is capable of controlling the mouse cursor and mouse
button states of the target computer through a special six byte command
sequence. This same command sequence sent to the Com Port of the
USBtoUSB can be used in any of the operating modes.
The six byte mouse control sequence is construced as follows:
Byte#1 Byte#2 Byte#3 Byte#4 Byte#5 Byte#6
[Start] [X PosMS] [X PosLS] [Y PosMS] [Y PosLS] [Scroll/Buttons]
Byte #1 - Always a 0x00 value, indicates start of packet.
Byte #2 & #3 - A two byte value which dictates the X axis position
of the mouse cursor on the screen. A value of 0 will send the
cursor to the leftmost screen position. Byte #2 is the Most
Siginificant (MS) byte of the X position value, and Byte #3 is the
Least Significant (LS) part of the X position value.
Byte #4 & #5 - A two byte value which dicatates the Y axis position
of the mouse cursor on the screen. A value of 0 will send the
cursor to the top of the screen. Byte #4 is the MS byte of the Y
position value, and Byte #5 is the LS part of the Y position value.
Byte #6 - Byte for Scroll Wheel movement and mouse button
control. The upper 4 bits of this byte contain a signed value for
scroll wheel movement, while the lower 3 bits command the mouse
Left, Right, and Middle button activation and deactivation.
This Byte #6 is constructed as shown,
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
[Ws] [W2] [W1] [W0] [1] [MM] [MR] [ML]
[Ws] - The sign of the scroll wheel movement. A zero in this bit
commands up movement on the scroll wheel, a one in this bit
produces down scroll wheel movement. Movement magnitude
based on the signed value in Ws through W0 values.
10

8
By using the make and break commands in Key Number Mode, any
sequence that can by manually entered on a keyboard can be produced
with the USBtoUSB. Use this Key Number Mode to emulate single
keystrokes or combinations such as Ctrl+F1, or Shift+Alt+F5, etc.
Additional Key Number Mode Control Commands
The USBtoUSB features two additional commands for keyboard action.
The first command provides a way to clear the keyboard buffer and is
useful for ensuring that no keys are left in the “ON” state. The second
command allows for the polling of the keyboard status LED states. This
polling command is useful for checking the Shift Lock state, or for making
sure of the Num Lock state before using Num Lock affected keys.
0x38 - USB Buffer Clear Command. Sending the byte 0x38 to the
USBtoUSB Com Port port results in the device’s internal USB keyboard
buffer being cleared. Use of this command ensures that all made keys
currently in the keyboard buffer are released.
0x7F - Status LED Read Command. Sending a code 0x7F to the USBtoUSB
Com Port results in the return of a character in the range of ASCII
“0” - “7”. The USBtoUSB Com Port response character reflects the
current state of the Scroll Lock, Caps Lock, and Num Lock LEDs on the
target computer system as listed in the chart below.
ASCII Response Scroll Lock Status Caps Lock Status Num Lock Status
“0” Off Off Off
“1” Off Off On
“2” Off On Off
“3’ Off On On
“4” On Off Off
“5” On Off On
“6” On On Off
“7” On On On
11
[W2] - The most significant bit of the scroll wheel movement
magnitude.
[W1] - Bit 1 of the three bit value for scroll wheel movement.
[W0] - Least significant bit of the scroll wheel movement value.
[1] - Bit 3 of the #6 byte is always “1”. Sending “0” for this bit will
cause the entire mouse control packet to be ignored.
[MM] - State of the middle mouse button. Set to 1 for middle
mouse button on, 0 for the button to be off.
[MR] - State of the right mouse button. Set to 1 for right mouse
button on, 0 for the button to be off.
[ML] - State of the left mouse button. Set to 1 for left mouse
button on, 0 for the button to be off.
NOTES - When sending this six byte mouse command packet to
the USBtoUSB Com Port, the five bytes following the first 0x00
byte should be sent with no more than 50msec between each
byte. The starting value 0x00 must always be followed by five
additional bytes to complete the mouse control packet and avoid
any confusion between mouse control and keystroke commands.
The scroll wheel magnitude command is a 4 bit signed value
located in bits Ws through W0, and in the range of 0x00 to 0x07
for up movement, 0x0F to 0x08 for down movement.
The three mouse button bits [MM], [MR], and [ML] command the
states of the mouse buttons as seen by the target computer. A “1”
in the respective bit indicates the mouse button is on, while a “0”
indicates the button is off. Be sure to command the release of any
mouse buttons that were in the on state at a later time once the
mouse button task has completed.

US Key Number Table (Decimal Values)
An international key number table is available on the CD provided with the USBtoUSB.
7
Key Make Break
`~ 01 129
1! 02 130
2@ 03 131
3# 04 132
4$ 05 133
5% 06 134
6^ 07 135
7& 08 136
8* 09 137
9( 10 138
0) 11 139
-_ 12 140
=+ 13 141
BS 15 143
Tab 16 144
Q 17 145
W 18 146
E 19 147
R 20 148
T 21 149
Y 22 150
U 23 151
I 24 152
O 25 153
P 26 154
[{ 27 155
]} 28 156
\| 29 157
Caps 30 158
A 31 159
S 32 160
D 33 161
F 34 162
G 35 163
H 36 164
Key Make Break
J 37 165
K 38 166
L 39 167
;: 40 168
‘“ 41 169
Enter 43 171
L Shift 44 172
Z 46 174
X 47 175
C 48 176
V 49 177
B 50 178
N 51 179
M 52 180
,< 53 181
.> 54 182
/? 55 183
R Shift 57 185
L Ctrl 58 186
L Alt 60 188
Space 61 189
R Alt 62 190
R Ctrl 64 192
L Win 70 198
R Win 71 199
Win APL 72 200
Insert 75 203
Delete 76 204
L Arrow 79 207
Home 80 208
End 81 209
Up Arrow 83 211
Dn Arrow 84 212
Page Up 85 213
Page Dn 86 214
Key Make Break
R Arrow 89 217
NumLock 90 218
7 (Num) 91 219
4 (Num) 92 220
1 (Num) 93 221
/ (Num) 95 223
8 (Num) 96 224
5 (Num) 97 225
2 (Num) 98 226
0 (Num) 99 227
* (Num) 100 228
9 (Num) 101 229
6 (Num) 102 230
3 (Num) 103 231
. (Num) 104 232
- (Num) 105 233
+ (Num) 106 234
Enter (Num) 108 236
Esc 110 238
F1 112 240
F2 113 241
F3 114 242
F4 115 243
F5 116 244
F6 117 245
F7 118 246
F8 119 247
F9 120 248
F10 121 249
F11 122 250
F12 123 251
Prt Scr 124 252
Scrl Lk 125 253
Pause/Break 126 254
When sending data to the Com Port on the USBtoUSB to generate
keystrokes at the target computer in Key Number Mode, use the
values shown above to produce the desired “make” and “break”
actions for the corresponding key.
12
When sending a mouse control packet for cursor movement only,
be sure to send all “0” values for the scroll wheel and mouse
button bits, provided those options are not being used for mouse
actions at that time.
Mouse Packet Examples
The packet below is an example of a packet sent to the USBtoUSB
Com Port to command the cursor to a screen postion of X =
100, Y = 520.
0x00, 0x00, 0x64, 0x02, 0x08, 0x08
Start XMS XLS YMS YLS Scroll
Sending the values shown above will cause the cursor to move to
the screen position 100, 520. The position of the mouse cursor
for the values sent is an absolute screen position and will be
repeatable for a specific computer and screen resolution.
A screen position of 0,0 represents the upper left of the screen.
To send the cursor to specific coordinates on the screen, use the 2
byte values for both X and Y in the packet described above.
The cursor position that results from a command packet will
depend on the particular computer’s display settings. Moving the
cursor to a desired screen position may require working with a few
values to get the exact value for a specific application.
The following packet can be used to send the scroll wheel
command of up one position to the computer.
How far the scroll moves on the computer screen depends on the
scroll system settings of the target computer.
0x00, 0x00, 0x00, 0x00, 0x00, 0x18

When using the Extended ASCII mode, characters sent to the USB
Com Port are in the range of 0x00 to 0xFF (0 to 255 decimal). The
corresponding keystrokes from the page 5 table will be generated.
Extended ASCII Mode allows for the ANSI/ISO Latin-1 character group
in the range of 0x80 to 0xFF (128 to 255 decimal) to be produced as
well as the standard 0x00 through 0x7F ASCII codes. Additionally in
this mode, the F1-F10 keys are supported for the character range of
codes 0x11 to 0x1A values respectively. F11 and F12 keys are sent for
Com Port characters of 0x0E and 0x0F in the Extended ASCII mode.
Example 1: If the value 0x41 (decimal 65) is received by the USB
Com Port in this mode, a capital “A” character will be produced on the
target computer’s USB port as a keystroke.
Example 2: If the value 0xA9 (decimal 169) is received by the USB
Com Port in this mode, a “©” character will be produced on the target
computer’s USB port as a keystroke.
Key Number Mode
The Key Number Mode provides complete control of the generation of
the make (activation) and break (deactivation) of any standard keyboard
key on the target computer. In this mode, a single byte sent to the USB
Com Port will command the make or break of a specific keyboard
key at the target computer. This mode allows for generation of any
keystroke or combination of keystrokes on the target computer.
In general, to make a key (generate a press of a specific key), a one
byte value between 0x00 and 0x7F is sent to the Com Port of the
USBtoUSB. The key specified will be seen as held down on the target
computer just as if someone was physically holding down that key on
a keyboard.
Each time a make is done for a key, a corresponding break (release) of
that key must be done at a later time to deactivate it. The break code
for a key is the same value as the make code plus 0x80. The break
code releases the key that was activated earlier by a make code. See
the following table for Key Number Mode make and break codes.
613
In the next example, four Com Port mouse packets are sent to
emulate a double left mouse click on the target computer.
Packet 1 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x09 (left mouse
button on). Delay around 150 msec after sending this packet for
the system to see the button.
Packet 2 - 0x00, 0x00, 0x00 0x00, 0x00, 0x08 (left mouse
button off). Delay 150 msec again for the system to see the button
release and create time between the release and activation of the
left mouse button in step 3 below.
Packet 3 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x09 (left mouse
button on). Delay around 150 msec for the system to see the
button.
Packet 4 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x08 (left mouse
button off). No delay required after this release.
Cursor position, scroll wheel movement and button actions may
all be implemented within the same packet. The examples above
focus only on a particular action at a time for clarity. For instance,
a command that sends both X and Y cusor movement can also
send button information and/or scroll wheel movement.
Note that X and Y coordinates require the proper X and Y screen
resolution set by the USBtoUSB.exe to obtain a 1:1 ratio beween
the commanded values and the resulting cursor position.
Sending Serial Control Commands
The CD included with the unit contains source code examples in
various programming languages to help the user get started on
their own Com Port control software. Use these examples as a
reference point for writing programs on the computer attached to
the USBtoUSB Com Port connection.

5
Value Character Value Character Value Character Value Character
Dec Hex Dec Hex Dec Hex Dec Hex
00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
00
01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F
none
none
none
none
none
none
none
none
Backspace
Tab
none
none
none
Return
F11
F12
none
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
Esc
none
none
none
none
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F
30
31
32
33
34
35
36
37
38
39
3A
3B
3C
3D
3E
3F
Space
!
“
#
$
%
&
‘
(
)
*
+
,
_
.
/
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
40
41
42
43
44
45
46
47
48
49
4A
4B
4C
4D
4E
4F
50
51
52
53
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
[
\
]
^
-
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
60
61
62
63
64
65
66
67
68
69
6A
6B
6C
6D
6E
6F
70
71
72
73
74
75
76
77
78
79
7A
7B
7C
7D
7E
7F
`
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
{
|
}
~
none
Value Character Value Character Value Character Value Character
Dec Hex Dec Hex Dec Hex Dec Hex
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
80
81
82
83
84
85
86
87
88
89
8A
8B
8C
8D
8E
8F
90
91
92
93
94
95
96
97
98
99
9A
9B
9C
9D
9E
9F
€
none
‚
ƒ
„
…
†
‡
ˆ
‰
Š
‹
Œ
none
Ž
none
none
‘
’
“
”
•
–
—
˜
™
š
›
œ
none
ž
Ÿ
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
AA
AB
AC
AD
AE
AF
B0
B1
B2
B3
B4
B5
B6
B7
B8
B9
BA
BB
BC
BD
BE
BF
nb Space
¡
¢
£
¤
¥
¦
§
¨
©
ª
«
¬
none
®
¯
°
±
²
³
´
µ
¶
·
¸
¹
º
»
¼
½
¾
¿
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
C0
C1
C2
C3
C4
C5
C6
C7
C8
C9
CA
CB
CC
CD
CE
CF
D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
DA
DB
DC
DD
DE
DF
À
Á
Â
Ã
Ä
Å
Æ
Ç
È
É
Ê
Ë
Ì
Í
Î
Ï
Ð
Ñ
Ò
Ó
Ô
Õ
Ö
×
Ø
Ù
Ú
Û
Ü
Ý
ß
à
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
E0
E1
E2
E3
E4
E5
E6
E7
E8
E9
EA
EB
EC
ED
EE
EF
F0
F1
F2
F3
F4
F5
F6
F7
F8
F9
FA
FB
FC
FD
FE
FF
à
á
â
ã
ä
å
æ
ç
è
é
ê
ë
ì
í
î
ï
ð
ñ
ò
ó
ô
õ
ö
÷
ø
ù
ú
û
ü
ý
þ
ÿ
Extended ASCII Mode Translation Table
14
The user’s software should always open the USBtoUSB Com Port
using 19,200 BAUD, 8 Bit characters, No Parity, and One Stop
Bit.
When the USBtoUSB Com Port is attached to the user’s computer,
it will be assigned a particular Com Port Number. In order to send
communication to the USBtoUSB, the proper Com Port number
must be opened to communicate with the USBtoUSB device.
The included CD contains examples in various programming lan-
guages for sending commands to the USBtoUSB Com Port for the
different modes of translation.
Use these programming examples as a starting point for the ap-
plication software that will be used to control the keyboard and
mouse actions through the USB com port to the target computer.
USBtoUSB Configuration Program
The unit features programmable settings for selecting the serial
data translation mode and setting the target computer screen size
information into the USBtoUSB unit for the user’s application.
The included CD contains the program “USBtoUSB.exe”. Copy
the entire contents of the CD to a dedicated folder on the target
computer’s drive. Once copied, run “USBtoUSB.exe”.

4
Value Character Value Character Value Character Value Character
Dec Hex Dec Hex Dec Hex Dec Hex
00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
00
01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F
none
none
none
none
none
none
none
none
Backspace
Tab
none
none
none
Return
none
none
none
none
none
none
none
none
none
none
none
none
none
Esc
none
none
none
none
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F
30
31
32
33
34
35
36
37
38
39
3A
3B
3C
3D
3E
3F
Space
!
“
#
$
%
&
‘
(
)
*
+
,
_
.
/
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
40
41
42
43
44
45
46
47
48
49
4A
4B
4C
4D
4E
4F
50
51
52
53
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
[
\
]
^
-
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
60
61
62
63
64
65
66
67
68
69
6A
6B
6C
6D
6E
6F
70
71
72
73
74
75
76
77
78
79
7A
7B
7C
7D
7E
7F
`
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
{
|
}
~
none
ASCII Mode Translation Table
The ASCII mode table below lists the standard ASCII characters to be
sent to the USB Com Port for producing a corresponding keystroke on
the target computer when processed by the USBtoUSB unit.
Extended ASCII Mode
The USBtoUSB Extended ASCII Mode of operation allows for the
standard ASCII character set (values 0x00 to 0x7F), and an extended
ASCII character set (values 0x80 to 0xFF). When a byte is sent to the
USB Com Port in Extended ASCII mode, it produces a USB keystroke
on the target PC which corresponds to the table on the next page.
15
ASCII Mode Translation Table
To configure the USBtoUSB, select the Control Mode from the
dropdown box to choose the conversion mode. Select between
ASCII (factory default), Extended ASCII, or Key Number Mode.
See pages 3-9 for a description of each of the control modes.
Next, enter the screen X and Y size for the target computer’s dis-
play settings. The X and Y sizes are used to set the USBtoUSB
internal storage such that the serial control for the mouse cursor
will better match the target system. When the USBtoUSB.exe pro-
gram is started, the X and Y values a are populated with the target
computer’s current display settings. The user may change these
if needed, but in general, the values selected by the program are
the proper values to be used. (See note on page 16)
Saving the Configuration to the USBtoUSB
Once the desired parameters have been set on the USBtoUSB
Configuration Utility Screen, it must be saved to the USBtoUSB unit to
begin operation according to those settings.
Select the button “Save To USBtoUSB” to write the configuration to
the unit. Once the configuration has been written, the USBtoUSB will
restart and begin operating according to the selected mode.

Introduction to the USBtoUSB
The USBtoUSB Keyboard/Mouse device is a product which emulates a
USB Com Port on one computer and a USB keyboard and mouse on
a target computer. Commands sent from the computer with the Com
Port produce keyboard and mouse actions on the target computer.
The USB target port of this device can be connected to any USB port
that supports a standard USB Keyboard and Mouse. No special drivers
are required. The USBtoUSB Com Port also uses standard drivers.
The USBtoUSB is configurable for three different modes of serial data
translation. This unit is shipped in ASCII mode, but can be changed to
other modes using the supplied “USBtoUSB.EXE” program.
Translation Modes of the USBtoUSB
The USBtoUSB receives data from it’s USB Com Port and translates
that data into USB keystrokes and mouse action on another computer.
USB Com Port data can be translated using one of three modes. ASCII
Mode, Extended ASCII Mode, or Key Number Mode.
ASCII MODE (Default Mode)
The ASCII mode is the default factory setting for the method of data
translation. In this mode, printable ASCII characters are sent to the
USB Com Port as a one byte value, each in the range of 0x00 to 0x7F
(0 to 127 decimal). Every character received in this mode generates it’s
corresponding USB keystroke on the computer where the USBtoUSB
KBD/MOUSE port is connected. See the ASCII table on the next page
for a list of the characters recognized and translated for ASCII mode.
Example: If a one byte value of 0x41 (decimal 65) is sent to the USB
Com Port in this mode, a capital “A” character will be produced as a
keystroke on the target computer’s USB port.
ASCII characters sent to the Com Port which are out of the 0x00 to
0x7F range will be ignored in this mode.
3
The configuration may also be read from the USBtoUSB unit by
selecting the button “Read From USBtoUSB”. The configuration in the
USBtoUSB attached to the computer’s USB port will be read into the
configuration parameters on the screen.
Once a configuration has been created, it is recommended that it be
stored on the computer so that it may be recalled at a later time. Use
the “File” menu to perform saving and opening of configurations.
Saving the configuration to a file on the computer provides an easy
way to be able to recall the same configuration at a later time to save
into additional USBtoUSB units.
16
Custom USBtoUSB Options
We offer special modifications to our standard USBtoUSB unit to conform to your exact
specifications. Customizations include different translation modes, different enclosure,
etc. just to name a few options. Let us know if you have special requirements. Please
call or email with your specific custom needs.
Note about the X and Y size settings. The information about the
screen size is important for controlling the cursor with the mouse control
packets. The program will show the current settings on the machine
where the USBtoUSB.exe program is being run.
Assuming the program is being run on the target machine, no changes
are required to the values the program populates. If the USBtoUSB will
be run on a different computer, change the X and Y settings to match
that system if they differ from the target machine’s screen resolution.

Introduction to the USBtoUSB 3
Translation Modes of the USBtoUSB 3
ASCII Mode 3
Extended ASCII Mode 4
Key Number Mode 6
Additional Key Number Mode Commands 8
Key Number Mode Examples 9
Producing Mouse Action on the Target Computer 10
Mouse Packet Examples 12
Sending Serial Control Commands 13
USBtoUSB Configuration Program 14
USBtoUSB Connections & Specifications 17
17 2
CONTENTS
Operating Voltage 5 Volts DC +/- 5%
(Powered from USB ports)
Operating Current Less than 100 ma each port
Operating Temp. 0 to 70 Degrees C
Computer Interface USB - Target Computer
USB - Com Port Source
Cable Length Maximum 15ft each port
USB Com Port Protocol 19200, 8 , N, 1
USBtoUSB Specifications
USBtoUSB Connections
Using the included USB cables, attach the Com Port USB connector
to the computer that will be sending commands to the USBtoUSB.
Attach the KBD/MOUSE connector to the target computer where
the keyboard and mouse actions will be generated based on the
commands.
USB Com Port
device, attach
to the computer
sending the serial
commands.
USB KBD/MOUSE Port, attach
to the computer where the
keyboard and mouse actions
are to take place.
Questions or Comments?
Please send us an email!
www.hagstromelectronics.com
email: sales@hagstromelectronics.com
USB Data from USB Com
Port on one Computer
Generates Keyboard and Mouse
actions on another Computer
This port is also to be
plugged into the computer
running the USBtoUSB.exe
configuration program.

Warranty
HAGSTROM ELECTRONICS, INC. warrants this
product against defects in material or workmanship for a
period of ONE YEAR from the original purchase date. We will
repair or replace (at our option) the returned defective unit
at no charge during this warranty period.
No responsibility is assumed for any special, incidental,
or consequential damage resulting from the use of or
inability to use this product. In no case is HAGSTROM
ELECTRONICS, INC. to be liable for any amount which
exceeds the purchase price of the unit, regardless of the
claim.
No other warranty, written or verbal, is authorized. This
warranty is applicable only to units sold in the United States.
Units sold outside the United States are covered by a similar
warranty.
Great care has been taken during the assembly, testing, and burn-in of
your USBtoUSB to ensure its performance. If you have any questions,
please send us an email or give us a call. Support is available Monday
through Friday, 8:00 am to 5:00 pm (EST).
customer service email: [email protected]
Call Toll Free 888-690-9080, or (540) 465-4677
NOTICE: The USBtoUSB product is designed to be used by technically
oriented computer users.
Thank you for purchasing the model USBtoUSB Adapter.
HAGSTROM ELECTRONICS, INC.
is pleased that you have selected this product for your application.
This unit is may be used a variety of ways in order to meet your
specific requirements. Please take a few minutes to read this
manual before using your USBtoUSB.
If you have any questions about the use of the USBtoUSB not
covered in this manual, please contact us directly. We offer toll
free technical product support from 8:00am to 5:00pm M-F
Eastern Time 888-690-9080. You may also send an email to
We respond to all email requests within one business day.

USBtoUSB
USB Serial Port to USB
Keyboard and Mouse Action
User Manual
Toll Free 888-690-9080
Phone: (540) 465-4677 Fax: (540) 465-4678
Monday through Friday, 8:00 am to 5:00 pm (EST)
www.hagstromelectronics.com
1986 Junction Road, Strasburg, VA 22657
Copyright © 2020 HAGSTROM ELECTRONICS, INC.
V. 09.20
HAGSTROM
ELECTRONICS, INC.
Table of contents